简体   繁体   English

iPhone开发人员-UINavigationController可以使视图的一部分动画吗?

[英]iphone dev - Can UINavigationController animate part of the view?

My app is using a navigation controller and it has a navigation bar, a table view and an image on each view. 我的应用程序正在使用导航控制器,它具有导航栏,表格视图和每个视图上的图像。 Those elements layout from top to bottom with no overlapping. 这些元素从上到下没有重叠地布置。

Now because I have the exactly same image for every view (a logo), is it possible to animate only the navigation bar and the table view while the views push and pop? 现在,因为每个视图都有一个完全相同的图像(徽标),所以在视图按下和弹出时是否可以仅对导航栏和表格视图设置动画? I want the logo always stays on the screen. 我希望徽标始终保留在屏幕上。

Thanks in advance. 提前致谢。

Interesting idea. 有趣的主意。 You might try adding the view directly as a subview of the navigation controller's view, rather than making it part of any of the controllers it manages—in that case, you probably also want to give the view a particular tag , then retrieve a reference to it in your individual controllers' -viewWillAppear:animated: and call -bringSubviewToFront: with it on the navigation controller. 您可以尝试将视图直接添加为导航控制器视图的子视图,而不是使其成为其管理的任何控制器的一部分-在这种情况下,您可能还希望为视图提供特定的tag ,然后检索对在您的各个控制器的-viewWillAppear:animated: -bringSubviewToFront: ,然后在导航控制器上调用-bringSubviewToFront:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM