2012-08-08 39 views
0

flow 我想在標籤欄C對IBAction爲從一個按鈕newViewController到達。但是當我到達標籤欄控制器顯示A的視圖,而不是C的視圖。如果使用Tabbarcontroller行爲 - iOS設備

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; 

UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"MyInitialViewController"]; 
[vc presentModalViewController:navController animated:NO]; 

我最終沒有選擇的TabBar和導航欄創建視圖C標籤欄這樣 c

任何幫助將不勝感激!謝謝

回答

0

如果你用故事板,並希望保持導航欄和標籤欄,你應該使用模式呈現

使用

[self.navigationController performSegueWithIdentifier:@"MyInitialViewController" sender:self]; 

代替