2010-09-21 58 views
0

我正在處理基於導航的應用程序...我已經顯示第一個屏幕...在第一個有標籤,圖像,按鈕和標籤欄項目...當我們按下按鈕時它顯示新的屏幕..請告訴我如何把一個新的屏幕如何從Ibaction調用?

回答

0

請告訴我如何把一個新的 屏幕

假設你正在建設一個基於導航的應用程序,一般模式是:

- (void)showMyViewController 
{ 
    MyViewController* myViewController = [[MyViewController alloc] initWithNibName:@"MyView" bundle:nil]; 
    [self.navigationController pushViewController:myViewController animated:YES]; 
    [myViewController release]; 
} 
+0

- (void)buttonClicked:(id)sender {secondView controller = [[SecondViewController alloc] initWithNibName:@「secondViewController」bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:secondViewcontroller animated:YES]; }每當我點擊按鈕,它不顯示轉到另一個視圖.... n也按鈕dose nt顯示任何操作..plzz幫助我.. – user453440 2010-09-21 08:28:40