问题出在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;

}

Two-stage rotation animation is deprecated. This application should use the smoother single-stage an的更多相关文章

  1. spark 划分stage Wide vs Narrow Dependencies 窄依赖 宽依赖 解析 作业 job stage 阶段 RDD有向无环图拆分 任务 Task 网络传输和计算开销 任务集 taskset

    每个job被划分为多个stage.划分stage的一个主要依据是当前计算因子的输入是否是确定的,如果是则将其分在同一个stage,从而避免多个stage之间的消息传递开销. http://spark. ...

  2. 在服务器上实现SSH(Single Stage Headless)

    服务器上ssh实现 写在前面:这只是我在服务器上的环境实现的,仅供参考.要根据自己系统的环境做出修改. ==github源码(https://github.com/mahyarnajibi/SSH)= ...

  3. 论文阅读笔记三十九:Accurate Single Stage Detector Using Recurrent Rolling Convolution(RRC CVPR2017)

    论文源址:https://arxiv.org/abs/1704.05776 开源代码:https://github.com/xiaohaoChen/rrc_detection 摘要 大多数目标检测及定 ...

  4. tableView header Refresh 下拉刷新/上拉加载

    一. UIScrollView 的分类 //作为入口 #import <UIKit/UIKit.h> #import "RefreshHeader.h" #import ...

  5. Methods to reduce the number of pipeline stages

    Several techniques have been proposed to reduce the number of pipeline stages. We categorize them in ...

  6. [iOS Animation]-CALayer 显示动画

    显式动画 如果想让事情变得顺利,只有靠自己 -- 夏尔·纪尧姆 上一章介绍了隐式动画的概念.隐式动画是在iOS平台创建动态用户界面的一种直接方式,也是UIKit动画机制的基础,不过它并不能涵盖所有的动 ...

  7. css3 transition animation nick

    时光转眼即逝,又到周六了,今天写点某部分人看不起的css玩玩! 转换 转换属性transform: 浏览器前缀: -webkit-transform;-o-transform;-moz-transfo ...

  8. Spark技术内幕:Stage划分及提交源码分析

    http://blog.csdn.net/anzhsoft/article/details/39859463 当触发一个RDD的action后,以count为例,调用关系如下: org.apache. ...

  9. Spark技术内幕:Stage划分及提交源代码分析

    当触发一个RDD的action后.以count为例,调用关系例如以下: org.apache.spark.rdd.RDD#count org.apache.spark.SparkContext#run ...

随机推荐

  1. bzoj千题计划119:bzoj1029: [JSOI2007]建筑抢修

    http://www.lydsy.com/JudgeOnline/problem.php?id=1029 把任务按截止时间从小到大排序 如果当前时间+当前任务耗时<=当前任务截止时间,把这个任务 ...

  2. Android 利用广播接收器启动服务

    public class MainActivity extends Activity { private Button bt ; protected void onCreate(Bundle save ...

  3. IntelliJ IDEA编码格式设置

    之前一直使用eclipse能够熟悉的设置工程和文件的编码格式,现在换成IntelliJ IDEA设置编码格式的地方有点变化,按照如图所示进行设置: 这里要将Transparent native-to- ...

  4. IntelliJ IDEA中Java类注释

    打开Idea,依次选择File-->Settings-->Editor-->File and CodeTemplates ,右侧tab选项卡点击Includes,选择File Hea ...

  5. typdef用法总结

    typdef是在计算机编程语言中用来为复杂的声明定义简单的别名用的 typedef与#define有些相似,但更多的是不同,特别是在一些复杂的用法上,就完全不同了,在网上找了很多资料,结合自己遇到的各 ...

  6. 介绍一个基于jQuery的Cookie操作插件

    在网页客户端,我们经常会遇到读取或者设置cookie的情况,如果用纯生的js我们可能会遇到一些兼容性带来的麻烦,这里给大家介绍一个比较实用jquery操作cookie的插件,插件的源代码如下: jQu ...

  7. C++中的二级指针和指针引用函数传参

    在函数的使用过程中,我们都明白传值和传引用会使实参的值发生改变.那么能够通过传指针改变指针所指向的地址吗? 在解决这个问题之前,也许我们应该先了解指针非常容易混淆的三个属性: ①.指针变量地址(&am ...

  8. 如何开启一个Django项目

    一:新建的Django工程 新建了一个Django工程后,工程会自动创建有两个templates文件夹和unitled文件夹,再加上一个manage.py文件. 二:Django开发的一般流程 在工程 ...

  9. git 配置 SSH密钥

    1.登录用户 $ git config --global user.name "geekfeier" $ git config --global user.email " ...

  10. Hyperledger Fabric1.0.0搭建

    系统环境: 阿里云新装的Centos7.2 yum -y update yum install -y openssl openssl-devel gcc gcc-c++ zlib zlib-devel ...