从故事板设置时,UITabBarController转换不起作用

时间:2014-08-27 20:07:22

标签: ios ios7 xcode5 uitabbarcontroller transition

我的应用在UITabBarController中有四个标签。我正在使用故事板来布局我的应用程序。在Attributes Inspector中,我将UITabBarController的Transition Style设置为Cross Dissolve。但是当我运行应用程序时,标签仍然会在没有任何转换的情况下卡入到位。谢谢你的帮助。

更新

进一步调查了我的代表方法

`tabBarController:animationControllerForTransitionFromViewController:toViewController:`

但是这个方法的问题是文档说方法是Called to allow the delegate to return a UIViewControllerAnimatedTransitioning delegate object for use during a noninteractive tab bar view controller transition.这里我采用非交互式来表示"不是由于用户tappings"。但我想要定义的转换恰好适用于用户点击TabBar图标的时候。

1 个答案:

答案 0 :(得分:2)

以下文章应该具备您的需求。它有各种各样的例子,也有一个git项目。 http://objectivetoast.com/2014/03/17/custom-transitions-on-ios/。要看的git项目是

https://github.com/ObjectiveToast/CustomTransitions

https://github.com/twotoasters/Toast