开发者

Show a loading view and switching to TabBarController in iPhone app

I'm developing an iPhone application that have a TabBarController with two tabs.

Each tab contains a UIWebView that loads a web page from my web site.

I want to add a view that will function as a welcome screen that doesn't show the TabBarController itself (full screen view) and indicates that the application is being loaded.

After that I want to hide the welcome screen a开发者_如何学Pythonnd show the TabBarController

Can anyone point me to the right direction on how to implement this functionality?

Thanks!


I would suggest using a modal view controller for the loading view:

- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated

If you present the modal view controller as soon as your app launches (with no animation), it will be on top of everything, including the tab bar, even if it was presented by one of the tab view controllers.

Once the loading is done, you can dismiss the modal view controller:

- (void)dismissModalViewControllerAnimated:(BOOL)animated

You could animate the dismissal or not.

If your Default.png (launch screenshot) looks like the modal view, the whole thing should be pretty seamless.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜