0
我按照本指南Implementing a Container View Controller制作了一个可处理应用程序中的登录/注销的容器。防止在自定义容器中使用UINavigationBar动画
儿童视图控制器是:UINavigationController的进行登录,并的UITabBarController的应用程序的其余部分:
我的问题是,UINavigationBar的动画奇怪的是,我想阻止它的动画:
动画代码基本上是这样的(full project code here):
let current = childViewControllers.first
current?.willMoveToParentViewController(nil)
child.securityContainer = self
addChildViewController(child)
child.view.frame = newChildOriginFrame
UIView.transitionWithView(view, duration: 0.3, options: [], animations: {
child.view.frame = newChildTargetFrame
current?.view.frame = oldChildTargetFrame
self.view.addSubview(child.view)
}, completion: { _ in
child.didMoveToParentViewController(self)
current?.view.removeFromSuperview()
current?.removeFromParentViewController()
current?.securityContainer = nil
})
如何防止UINavigationBar的动画?