我有一个按钮,里面有触摸事件。当我编写以下代码来更改根 viewController 时,警告显示:Two-stage rotation animation is deprecated. This application should use the smoother single-stage animation
- (IBAction)fn_login:(id)sender {
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
UIWindow *window = delegate.window;
rootTabViewController* rootVC = [[[rootTabViewController alloc]init]autorelease];
window.rootViewController = rootVC;
}
rootTabViewController 是一个 UITabbarController。
如果将 UINavigationBar 与 UITabbarViewController 一起使用,则警告是相同的。
UINavigationController *navigationCtrl = [[[UINavigationController alloc] initWithRootViewController:rootVC] autorelease];
window.rootViewController = navigationCtrl;