Stephen Hsu
Stephen Hsu

Reputation: 5177

How to present a 'launch view' modally before all other views?

In my tabbar based application, I need to present a 'launch view' who plays a role like a launch image. It contains a scroll view which displays several images. As it doesn't belong to the main tabbar based architecture, I'd like to present it modally.

Now my question is where to launch it. I run the [self.window.rootViewController presentModalViewController:launchViewController animated:YES]; after the [self.window makeKeyAndVisible]; inside the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method.

It works, but the main tab bar views will appear shortly before the 'launch view' appears. I need the 'launch view' to display before all other views.

Upvotes: 2

Views: 1852

Answers (1)

Artur Ozierański
Artur Ozierański

Reputation: 1177

Present it modally in

- (void)viewDidAppear:(BOOL)animated

of your root view controller.

Also present it without animation - it will prevent showing tab bar for a short time.

[self presentModalViewController:launchViewController animated:NO];

Upvotes: 1

Related Questions