标签:
- (void)restoreRootViewController:(UIViewController *)rootViewController { typedef void (^Animation)(void); UIWindow* window = self.window; rootViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; Animation animation = ^{ BOOL oldState = [UIView areAnimationsEnabled]; [UIView setAnimationsEnabled:NO]; window.rootViewController = rootViewController; [UIView setAnimationsEnabled:oldState]; }; [UIView transitionWithView:window duration:0.5f options:UIViewAnimationOptionTransitionCrossDissolve animations:animation completion:nil]; }
标签:
原文地址:http://www.cnblogs.com/songxing10000/p/4706131.html