2010-08-13 107 views

回答

4

啥說:

MyViewController *myViewController = [[MyViewController alloc] init]; 
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:myViewController]; 
[[self navigationController] presentModalViewController:navController animated:YES]; 
+1

'presentModalViewController'被棄用iOS6的的。請參閱http://stackoverflow.com/questions/12507455/a-lot-of-functions-are-deprecated-ios-6 – 2015-01-03 19:27:54

4

您可以使用導航控制器作爲模態視圖控制器。

[parent presentModalViewController:myNavigationController animated:YES]; 
2

您創建一個UINavigrationController,然後添加的UIViewController它,那麼你現在的導航控制器presentModalViewController