【发布时间】:2018-04-28 08:03:54
【问题描述】:
我有一个UITabBarController,它有 9 个视图控制器,我自定义处理带有前进和后退按钮的导航。我创建了一个UIViewControllerAnimatedTransitioning 对象来处理动画(从左到右简单),它在委托方法中返回:
tabBarController(_ tabBarController: UITabBarController, animationControllerForTransitionFrom fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning?
但是,在选择第五个索引之后,不再调用此函数(因为它现在由 UIMoreNavigationController 处理。是否有动画委托或我应该为 UIMoreNavigationController 实例处理它的某种方式?
【问题讨论】:
-
你有没有考虑过使用 UIPageViewController,而不是 UITabBarController?
-
一开始我应该将它作为一个 UIPageViewController 来完成,我可能不得不将我的代码迁移到它,但这样做会付出相当大的努力。所以我希望有一个更简单的方法。
标签: ios swift uitabbarcontroller