How to use UIViewControllerAnimatedTransitioning with UINavigationController?

前端 未结 4 1944
野性不改
野性不改 2020-12-08 06:00

How can I get custom transitions (iOS7) when pushing a view controller onto UINavigationController? I tried setting the TransitioningDelegate both

4条回答
  •  自闭症患者
    2020-12-08 06:37

    objc.io's post on view controller transitions are specifically for pushing and popping view controllers. http://objc.io/issue-5/view-controller-transitions.html

    I've done this animation (http://i.imgur.com/1qEyMu3.gif) solely based on the objc.io post.

    In short you have to have a class(es) implementing UINavigationControllerDelegate, and UIViewControllerAnimatedTransitioning with the required methods for returning the correct animator, and performing the animations.

提交回复
热议问题