How to change the Push and Pop animations in a navigation based app

前端 未结 25 1474
清酒与你
清酒与你 2020-11-22 12:46

I have a navigation based application and I want to change the animation of the push and pop animations. How would I do that?

Edit 2018

Ther

25条回答
  •  借酒劲吻你
    2020-11-22 13:18

    I am not aware of any way you can change the transition animation publicly.

    If the "back" button is not necessary you should use modal view controllers to have the "push from bottom" / "flip" / "fade" / (≥3.2)"page curl" transitions.


    On the private side, the method -pushViewController:animated: calls the undocumented method -pushViewController:transition:forceImmediate:, so e.g. if you want a flip-from-left-to-right transition, you can use

    [navCtrler pushViewController:ctrler transition:10 forceImmediate:NO];
    

    You can't change the "pop" transition this way, however.

提交回复
热议问题