我试图从 访问navigationController
,UIViewController
由于某种原因它等于nil
应用委托:
self.mainViewController = [[MainViewController alloc] init];
self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.mainViewController];
self.window.rootViewController = self.navigationController;
主视图控制器:
MyViewController *myViewController = [[MyViewController alloc] init];
[self.navigationController presentModalViewController:myViewController animated:YES];
有人遇到过这个问题吗?
谢谢!