简体   繁体   English

如何减慢UINavigationController的向后滑动动画?

[英]How can I slow down UINavigationController's swipe back animation?

So UINavigationController's swipe-to-go-back functionality, that was introduced with iOS 7, has an annoying "snap" at the end of the animation. 因此,iOS 7中引入的UINavigationController的滑动后退功能在动画末尾具有令人讨厌的“快照”。 It's really jarring to me as a user, and I feel like if the animation could be tinkered with, then it might feel a bit better. 作为用户,这确实让我感到不快,而且我觉得如果可以对动画进行修补,则感觉会好一点。

An example would be Instagram's update on 12/12/13. 例如,Instagram在13年12月12日更新。 They somehow slowed down the swipe-back animation so that it feels much more fluid. 他们以某种方式放慢了向后滑动动画的速度,使它感觉更加流畅。 Would this require completely custom functionality, or is there a way to hijack UINavigationController's existing functionality? 这是否需要完全自定义的功能,还是有办法劫持UINavigationController的现有功能? How can this be achieved? 如何做到这一点?

EDIT 编辑

Okay, so I know that custom transitions are the way to go. 好的,所以我知道自定义转换是必经之路。 However, I'm confused on exactly how to implement them. 但是,我对如何实现它们感到困惑。 I've seen references to several delegate methods, but no clear examples of how to achieve custom animations. 我已经看到了一些委托方法的参考,但是没有清晰的示例说明如何实现自定义动画。 Could someone provide a basic example, specifically for overriding UINavigationController's push/pop animations? 有人可以提供一个基本的示例,专门用于覆盖UINavigationController的推/弹出动画吗?

Yes, you can create your own interactive transitions to completely customise how they work! 是的,您可以创建自己的交互式过渡,以完全自定义其工作方式!

I followed a fairly decent tutorial in the " iOS 7 By Tutorials " PDF by Ray Wenderlich. 我在Ray Wenderlich撰写的“ iOS 7 By Tutorials ” PDF中关注了相当不错的教程。

I've also had a quick google and this might help: http://www.doubleencore.com/2013/09/ios-7-custom-transitions/ 我也有一个快速的谷歌,这可能会有所帮助: http : //www.doubleencore.com/2013/09/ios-7-custom-transitions/

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

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