我试图在确实加载的视图上呈现模态视图控制器。
这是代码:
if (!self.loginNavViewController_){
AHLoginViewController * loginVC = [[AHLoginViewController alloc] initWithNibName:@"AHLoginViewController" bundle:nil];
/*
AHTestViewController * test = [[AHTestViewController alloc] initWithNibName:@"AHTestViewController" bundle:nil];
*/
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:loginVC];
navController.modalPresentationStyle = UIModalPresentationFullScreen;
navController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
navController.title = @"Login to Instagram";
self.loginNavViewController_ = navController;
[self presentModalViewController:self.loginNavViewController_ animated:YES];
if (self.loginNavViewController_ == nil){
NSLog(@"NIL");
} else {
NSLog(@"NOT NIL");
}
}
但是我没有看到显示模式视图控制器。为什么??