基于导航的应用程序的翻转动画
如何在基于导航的应用程序中使用 backbarbuttonitem 的翻转动画,默认情况下,该动画充当我们导航的上一个视图的弹出窗口?我只想将翻转动画添加到基于导航的应用程序中。
How can I use a flip animation for backbarbuttonitem in a navigation based application, which by default acts as a pop to previous view from which we navigated from? I just want to add flip animation to my navigation based application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为此,您需要将默认后退按钮替换为自定义后退按钮。它不会是一个箭头按钮,因为据我所知,箭头导航按钮只存在于私有 API 中。
要创建按钮,请执行以下操作:
接下来,您需要创建
flipPopView
方法来实际翻转:我基于一些类似的代码,但它对您来说可能会有所不同。如果您遇到问题,请告诉我,我会看看我能做些什么。
To do this, you will need to replace the default back button with a custom back button. It will not be an arrow button, because as far as I am aware, the arrow navigation button only exists in a private API.
To create your button, do something like this:
Next you need to create the
flipPopView
method to actually flip back:I based this off of some of my similar code, but it might work differently for you. Let me know if you have problems, and I'll see what I can do.