2011-05-10 30 views
0
-(void)buttonClicked:(id)sender{ 
    NSLog(@"welcome button"); 
    testWebView = [[[TestWebView alloc]init] autorelease]; 
    [self presentModalViewController:testWebView animated:YES]; 

    [testWebView test]; 
} 

我觸發buttonclicked並在那裏我需要做PushViewController。需要在基於視圖的應用程序中添加pushviewcontroller

我的應用程序是基於視圖的應用

@All

感謝advance./

+0

testWebView是繼承自uiview還是uiviewcontroller? – Rony 2011-05-10 11:37:24

+0

testwebview是從uiviewcontroller – 2011-05-10 11:42:34

+0

因此,你想從基於視圖的應用程序切換到基於導航的應用程序? – 2011-05-10 12:01:52

回答

0

在應用程序委託添加導航控制器,並通過導航控制器

0
-(void)buttonClicked:(id)sender 
{ 

testWebView *srwmvc =[[testWebView alloc]init]; 

[self.navigationController pushViewController:srwmvc animated:TRUE]; 

} 
0

執行推送操作使用您的視圖的UIViewController訪問導航控制器

例如。

-(void)buttonClicked:(id)sender 
{ 
testWebView *testWebView =[[testWebView alloc]init]; 
[myViewUIController.navigationController pushViewController:testWebView animated:TRUE]; 
} 
相關問題