iOS 18 中的新 UITabBarController 动画导致
delegate = (self as UITabBarControllerDelegate)
UITabBarControllerDelegate代理方法添加如下代码:
UIView.setAnimationsEnabled(false)
UIView.setAnimationsEnabled(true)
func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
UIView.setAnimationsEnabled(false)
return true
}
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
UIView.setAnimationsEnabled(true)
}