iphone dev - UINavigationController 可以为视图的一部分设置动画吗?
我的应用程序使用导航控制器,它有一个导航栏、一个表格视图和每个视图上的图像。这些元素从上到下布局,没有重叠。
现在,因为每个视图(徽标)都有完全相同的图像,所以在视图推送和弹出时是否可以仅对导航栏和表格视图进行动画处理?我希望徽标始终保留在屏幕上。
提前致谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有趣的想法。您可以尝试将视图直接添加为导航控制器视图的子视图,而不是使其成为它管理的任何控制器的一部分 - 在这种情况下,您可能还想为视图提供特定的
标签
,然后在各个控制器的-viewWillAppear:animated:
中检索对其的引用,并在导航控制器上调用-bringSubviewToFront:
。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.