是否可以在 swift 中创建自定义 tabBarController
类以动画化选项卡之间的编程和交互式转换?
最佳答案
你可以试试这个在tabbar selecetion上的过渡动画
func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
guard let fromView = selectedViewController?.view, let toView = viewController.view else {
return false
}
UIView.transition(from: fromView, to: toView, duration: 0.3, options: [.transitionCrossDissolve], completion: nil)
return true }
引用使用此链接
How to animate Tab bar tab switch with a CrossDissolve slide transition?
关于ios - TabBarController 上的动画过渡?.selectedIndex 更改? ( swift ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30289727/