更新Xcode7之后报错: Assertion failure
2015-12-09 00:00
423 查看
更新Xcode7之后报错:
原因:新的SDK不允许在设置rootViewController之前做过于复杂的操作,导致在didFinishLaunchingWithOptions 结束后还没有设置rootViewController。
解决办法:
之后直接加入代码
临时设置一个root,在之后重新对root赋值!
Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3491.2.5/UIApplication.m:3173
原因:新的SDK不允许在设置rootViewController之前做过于复杂的操作,导致在didFinishLaunchingWithOptions 结束后还没有设置rootViewController。
解决办法:
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible];
之后直接加入代码
UIViewController* vc = [[UIViewController alloc] initWithNibName:nil bundle:nil]; self.window.rootViewController = vc;
临时设置一个root,在之后重新对root赋值!
相关文章推荐
- leetcode -- Climbing Stairs -- 简单重要
- xtrabackup版本较低触发nfs-v4的bug:cp: failed to preserve ownership: Invalid argument
- zzulioj 1809: make pair (数学转换求余简化)
- Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define 解决
- Daily Scrumming* 2015.12.8(Day 1)
- LeetCode 011 Container With Most Water
- 【转】MegaSAS RAID卡 BBU Learn Cycle周期的影响
- Daily Scrum 12.8
- nltk modules main
- lightoj1086 Jogging Trails
- 物理学家:用数学理论证明人工智能无法超越人类智慧
- Apktool 打包签名后安装出现 INSTALL_PARSE_FAILED_NO_CERTIFICATES错误
- Failover失效转移详解
- LeetCodeOJ_11_m_Container With Most Water
- LeetCode 219 Contains Duplicate II
- svn无法提交问题,The working copy failed to commit files
- LeetCode 217 Contains Duplicate
- 浅谈RAID写惩罚与IOPS计算[转载]
- UVA 11029 Leading and Trailing
- 事件传递之响应链(Event Delivery: The Responder Chain)【转】