Home  >  Q&A  >  body text

ios push切换视图的时候,返回时,怎样自定义动画?

比如我push的
[self.navigationController pushViewController:VC animated:NO];

自定义动画方式为kCATransitionFromLeft。意思就是从左往右切换。

因为默认的切换是视图从右往左进来。那么当返回时,切换方式还是默认的从左往右切换。
这跟我自定义的动画格格不入,但是我又不想自定义左侧导航按钮来自己实现事件和动画。有其他方法吗?

怪我咯怪我咯2715 days ago283

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 13:30:11

    If the default effect is not satisfactory, you need to customize the switching effect
    Example:
    http://www.shinobicontrols.com/blog/posts/2013/10/03/ios7-day-by-day-day-10-custom-uiviewcontroller-transitions

    reply
    0
  • Cancelreply