我已成功显示启动时对用户进行身份验证的视图。成功后,我希望presentModalViewController不再可见并正确地释放。
我的代码如下:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Add the tab bar controller's view to the window and display.
[self.window addSubview:tabBarController.view];
Overview *overview = [[Overview alloc] initWithNibName:@"Overview" bundle:nil];
[self.tabBarController presentModalViewController:overview animated:YES];
[overview release];
[self.window makeKeyAndVisible];
return YES;
}
最佳答案
在模态视图控制器中,您需要执行以下代码:
[self dismissModalViewControllerAnimated:YES];
关于iphone - 解散presentModalViewController的最优雅方法?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5694291/