簡體   English   中英

iOS 開口 animation

[英]iOS opening animation

我目前正在執行我自己版本的這個開頭 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 plays above everything.

在您的應用程序中:didFinishLaunchingWithOptions:您可以顯示模態視圖 controller 並在其中執行動畫,然后刪除 controller。

或者您可以在 window 上執行這些動畫。

由於控制器的視圖位於標簽欄 controller 內,因此它的視圖不會覆蓋標簽欄,因此無法顯示在它上面。

在運行 animation 之前,請調用:

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

這基本上將這 4 個對象拉到視圖的前面,因此它們位於其他所有對象之上。 您可能需要按照將 4 放在前面的順序進行調整。

除了 z 順序,您應該檢查您嘗試動畫的視圖是否具有適當的大小,否則它不可能覆蓋整個屏幕。 當然,請檢查您的視圖的超級視圖 - 如果超級視圖僅覆蓋 UITabBar 和 UIPicker 之間的區域,它永遠不會覆蓋它們。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM