final class TabBarController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
if #available(iOS 18.0, *) {
delegate = self
}
}
}
extension TabBarController: UITabBarControllerDelegate {
func tabBarController(_ tabBarController: UITabBarController, animationControllerForTransitionFrom fromVC: UIViewController,
to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return self
}
}
extension TabBarController: UIViewControllerAnimatedTransitioning {
func transitionDuration(using transitionContext: (any UIViewControllerContextTransitioning)?) -> TimeInterval {
return .zero
}
func animateTransition(using transitionContext: any UIViewControllerContextTransitioning) {
guard let view = transitionContext.view(forKey: .to)
else {
return
}
let container = transitionContext.containerView
container.addSubview(view)
transitionContext.completeTransition(true)
}
}
Post
Replies
Boosts
Views
Activity
We figured it out. The problem was in outlet named searchBar.