Two-stage rotation animation is deprecated. This application should use the smoother single-stage an
来源:互联网 发布:邵氏弃儿 后续 知乎 编辑:程序博客网 时间:2024/05/17 03:54
问题出在rootViewController同时包含UITabBarController和UINavigationController。
几经尝试,最后发现,在设置为window.rootViewController
之前,先指定tabBarController.selectedIndex = 0
,问题解决。
可以得出,出现上述错误,是因为XCode不知道你需要push哪个子viewController,在加载navigationController的时候,不知道要载入哪一个controller,于是无脑的将tabBarController的viewControllers都动画载入了。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.backgroundColor = [UIColor whiteColor]; UIStoryboard *pStoryBoard = [UIStoryboard storyboardWithName:@"FirstStoryBoard" bundle:nil]; UINavigationController *pNavigationController = [pStoryBoard instantiateInitialViewController]; UITabBarController *pTabBarController = (UITabBarController *)pNavigationController.visibleViewController; pTabBarController.selectedIndex = 0; /// 就是这句话 [UIApplication sharedApplication].delegate.window.rootViewController = pNavigationController; /// 这句话在其他VC也可以用 [self.window makeKeyAndVisible]; return YES;}
0 0
- Two-stage rotation animation is deprecated. This application should use the smoother single-stage an
- Two-stage rotation animation is deprecated. This application should use the smoother single-stage an
- Two-stage rotation animation is deprecated. This application should use the smoother single-stage an
- 在UINavigationController中使用UITabBarController,处理Two-stage Rotation错误
- DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command
- The Constructor Date(String) is Deprecated since of JDK 1.1 you should not use it
- DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command f
- Winamp quit the stage
- The Stage Fright
- #("The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name:")
- VS2015编译问题:The POSIX name for this item is deprecated. Instead, use the ISO C
- #("The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name:")
- What is the Best Multi-Stage Architecture for Object Recognition?
- 《What is the Best Multi-Stage Architecture for Object Recognition?》
- Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() inste
- Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() inste
- Deprecated: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() inst
- [AS3]root,this,stage关系
- jQuery文字和图片列表滚动插件
- 有关于HMAX的资料1
- 测试覆盖率工具
- ext.net 如何传参数
- codeforces-div1-285-D
- Two-stage rotation animation is deprecated. This application should use the smoother single-stage an
- Screen命令使用指南
- 最短路四种算法
- IOS后台运行 之 后台播放音乐
- apk反编译步骤
- MySQL事务
- [Leetcode 179, Medium] Largest number
- 利用OpenCV检测图像中的长方形画布或纸张并提取图像内容
- 对java语言"完全"面向对象的理解