开发者

Most Elegant way to dismiss a presentModalViewController?

I have successfully shown a view upon launch that authenticates a user. Upon success, I want the presentModalViewController to no longer be visible and deallocate properly.

My code is as follows:

- (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]开发者_如何学JAVA;
    [self.tabBarController presentModalViewController:overview animated:YES];
    [overview release];
    [self.window makeKeyAndVisible];

    return YES;
}


In your modal viewcontroller you need a piece of code doing:

[self dismissModalViewControllerAnimated:YES];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜