【问题标题】:UITabBarController transition not working when set from storyboard从情节提要设置时,UITabBarController 转换不起作用
【发布时间】:2014-10-21 13:32:24
【问题描述】:

我的应用在 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. 这里我将非交互式表示“不是由于用户点击”。但我试图定义的转换正是针对用户点击 TabBar 图标时的。

【问题讨论】:

  • 如果我能拒绝投票反对这个问题的人没有给出解释。
  • 当人们在不解释的情况下投反对票时,为什么我不浪费时间寻求解释。但是@KonsolLabapen 感谢您的回复;它还有更多。
  • WWDC 2013 上有一个很棒的讨论:218。特别是,交互式过渡是动画的节奏和成功取决于用户在动画期间所做的事情(例如滑动在标签视图之间。)为恢复旧答案而道歉,但当我遇到这个问题时,我希望看到这个参考。

标签: ios ios7 xcode5 uitabbarcontroller transition


【解决方案1】:

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

https://github.com/ObjectiveToast/CustomTransitions

https://github.com/twotoasters/Toast

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-21
    • 2015-08-27
    • 1970-01-01
    • 2012-03-27
    • 2012-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多