我已经成功地在启动时显示了一个对用户进行身份验证的 View 。成功后,我希望 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;
}
最佳答案
在您的模态视图 Controller 中,您需要一段代码:
[self dismissModalViewControllerAnimated:YES];
关于iphone - 关闭当前模态视图 Controller 的最优雅方式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5694291/