When I log in successfully with a third party and then jump to the UITabBarController, the viewWillAppear
of the UITabBarController is always executed twice.
This is the code of jumpping to the UITabBarController. TTabBarVC inherited from UITabBarController.
TTabBarVC *vc = [TTabBarVC new];
KLNavigationController *nc = [[KLNavigationController alloc] initWithRootViewController:vc];
UIViewController *oldRootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
[UIView transitionFromView:oldRootVC.view toView:nc.view duration:.3f options:UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionTransitionCrossDissolve completion:^(BOOL finished) {
[UIApplication sharedApplication].keyWindow.rootViewController = nc;
}];