0
A
回答
0
通常,這些類型的轉變(淡入/出局,進/出幻燈片)通過使用計時器,其逐漸調整大小/縮小的觀點完成的。我不知道在Cocoa做的更優雅的方式(儘管可能有一個),但是自己做這件事真的不是很難。只需創建一個時間間隔爲50ms左右的計時器(您可能需要一些時間間隔/調整大小的實驗以使其平滑),然後每次計時器啓動時,使電影播放器視圖稍微變大一點,直到您讓它達到你需要的尺寸。希望有所幫助。
1
如果你所有的視圖(而不是電影播放器)都在一個名爲bigController
的視圖控制器中,那麼試試看。
首先,在後臺添加電影播放器。假設你正在使用的MPMoviePlayerController
類,這是做什麼:
[bigController.view insertSubview:moviePlayerController atIndex:0];
然後動畫其他的東西遠:
[UIView animateWithDuration:0.5 animations:^{
for (UIView *view in [bigController subviews]) {
if (view != moviePlayerController.view) {
view.frame = CGRectMake(0, bigController.view.frame.size.height,
view.frame.size.width,
view.frame.size.height);
}
}
}];
相關問題
- 1. Slide effect with ngAnimate
- 2. css3 slideup slide down
- 3. JQuery Replace Element w/Slide Left Effect
- 4. Page Transition Slide Down&Bounce
- 5. libgdx button up down no effect
- 6. jQuery Accordion Toggle Slide Up&Down
- 7. jquery level two slide up and level three slides down
- 8. Border.Background Effect
- 9. Tableview not down down
- 10. ion-slide/ion-slide-page directives not rendering properly
- 11. Blurring Effect Widget
- 12. CSS - rowspan like effect
- 13. angularslideables reverse effect
- 14. CSS light(fading)effect
- 15. CSS'top'property has no effect
- 16. Tabs active effect
- 17. js/jquery coverflow effect
- 18. Letter Press Effect
- 19. Jquery的Sparkle Effect
- 20. XAML For Reflection Effect
- 21. Jquery Effect Onunload
- 22. Div Floating left down down
- 23. JQuery Slide Onclick
- 24. Storyboard uiviewcontroller'custom class'not in down down
- 25. python django excel server down down
- 26. html map area hover effect
- 27. Imageview Interactive-water-effect android
- 28. JQuery Effect多元素
- 29. SCrypt Lookup Gap Negative Effect
- 30. UITabBarController-like image masking effect
我很抱歉,但使用的計時器是絕對不能做的方式它在可可。 –