Post

Replies

Boosts

Views

Activity

Reply to [iOS 18] UITabBarController disable new switching animation
#import "TabBarVC.h" @interface TabBarVC () <UIViewControllerAnimatedTransitioning, UITabBarControllerDelegate> @end @implementation TabBarVC (void)viewDidLoad { [super viewDidLoad]; self.delegate = self; } #pragma mark - UITabBarControllerDelegate (nullable id )tabBarController:(UITabBarController *)tabBarController animationControllerForTransitionFromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC { return self; } #pragma mark - UIViewControllerAnimatedTransitioning (void)animateTransition:(nonnull id)transitionContext { UIView *toView = [transitionContext viewForKey:UITransitionContextToViewKey]; [transitionContext.containerView addSubview:toView]; [transitionContext completeTransition:YES]; } (NSTimeInterval)transitionDuration:(nullable id)transitionContext { return 0; } @end
Oct ’24