如何使用tabBarController进行并排转换。就像一个正常的" ScrollView分页。
目前我正在使用CrossDissolve:
class TransitioningObject: NSObject, UIViewControllerAnimatedTransitioning {
func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
let fromView: UIView = transitionContext.viewForKey(UITransitionContextFromViewKey)!
let toView: UIView = transitionContext.viewForKey(UITransitionContextToViewKey)!
transitionContext.containerView()!.addSubview(fromView)
transitionContext.containerView()!.addSubview(toView)
UIView.transitionFromView(fromView, toView: toView, duration: transitionDuration(transitionContext), options: UIViewAnimationOptions.TransitionCrossDissolve) { finished in
transitionContext.completeTransition(true)
}
}
func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
return 0.25
}
}
作为并排转换的扩展,我想在选项卡self.view上添加一个滑动手势。但那是后来的问题,现在我需要找出如何进行转换。