动画导航栏 à la PushViewController 不改变 viewController
我有一个显示 UIWebView
的 viewController
。在 UIWebView
内部,我运行了一个 Sencha Touch 应用程序。在 UIWebView
之上是本机 UINavigationBar
(不是 Sencha Touch)。
在 Sencha Touch 应用程序中,用户可以来回切换屏幕。 Sencha Touch 为这些开关设置动画,就像我在本机应用程序中调用 pushViewController
一样。
当然,来自我的 Sencha Touch 应用程序的那些动画不会更改本机 UINavigationBar
。我可以手动更改 left/rightBarButtonItems 和 navigationitem.title
。但我希望这些更改能够动画化,就像我调用 pushViewController
一样。
有没有什么方法可以在 UINavigationBar
上获取这些动画,而无需实际更改 UIWebView
或为其设置动画?任何想法都可以为我指明如何实现这一目标的正确方向,我将不胜感激……
I have a viewController
showing an UIWebView
. Inside of that UIWebView
I have a Sencha Touch App running. On top of that UIWebView
sits the native UINavigationBar
(not Sencha Touch).
Inside the Sencha Touch App, the user can switch the screens back and forth. Sencha Touch animates those switches, as they would be if I had called pushViewController
in my native app.
Of course those animations coming from my Sencha Touch App don't change the native UINavigationBar
. I can manually change the left/rightBarButtonItems and the navigationitem.title
. But I would like those changes to be animated as if I would have called pushViewController
.
Is there any way to get those animations on the UINavigationBar
without actually changing or animating the UIWebView
? Any idea's pointing me in the right direction how to achieve that would be well appreciated…
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过
UINavigationBar
的pushNavigationItem:animated
方法?您可以在UINavigationItem
上创建实例,并根据需要不断从导航栏中推送和弹出它们。UINavigationItem
还具有title
属性,用于处理导航标题和后退
按钮。阅读本文了解更多详情:
http://developer.apple.com/库/ios/#documentation/uikit/reference/UINavigationBar_Class/Reference/UINavigationBar.html
Have you tried
pushNavigationItem:animated
method ofUINavigationBar
? You can create instances onUINavigationItem
and keep pushing and popping them from navigation bar as you like.UINavigationItem
also hastitle
property which will take care of navigation titles andback
buttons.Read this for more details:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UINavigationBar_Class/Reference/UINavigationBar.html