开发者

iOS opening animation

I am currently executing my own version of this opening animation

http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial

The animation runs perfectly however once the default.png disappears and my animation starts the UITabBar and the UIPicker I have loaded in the first view are sitting above my animation when it plays.. I am wondering how to make sure this animation play开发者_JAVA技巧s above everything.


Before running the animation, call:

[self.view bringSubviewToFront:basketTop];
[self.view bringSubviewToFront:basketBottom];
[self.view bringSubviewToFront:napkinTop];
[self.view bringSubviewToFront:napkinBottom];

This basically pulls those 4 objects to the front of the view, so they are on top of everything else. You might need to play around with the order in which you bring the 4 to the front.


Except for the z-order you should check that the view you are trying to animate has the proper size, otherwise it can't possibly cover the whole screen. And of course check your view's superview - if the superview covers only the area between UITabBar and UIPicker it won't cover them, ever.


In your application:didFinishLaunchingWithOptions: you could present a modal view controller and perform your animation(s) inside of it then remove the controller.

Or you could perform those animations on the window.

Since the controller's view is inside a a tab bar controller, its view doesn't cover the tab bar and therefore cannot show over it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜