'Application windows are expected to have a root view controller at the end of application launch' [
来源:互联网 发布:淘宝400电话申请 编辑:程序博客网 时间:2024/05/22 11:31
删除Main.storyboard和launchboard.storyboard之后,将General ——》Deployment Info ——》Main Interface设置为空
在didFinishLaunchingWithOptions中添加以下代码后启动模拟器出现'Application windows are expected to have a root view controller at the end of application launch'异常
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. self.window = UIWindow(frame: UIScreen.mainScreen().bounds); self.window?.backgroundColor = UIColor.redColor(); self.window?.makeKeyAndVisible();
解决办法是:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. self.window = UIWindow(frame: UIScreen.mainScreen().bounds); self.window?.backgroundColor = UIColor.redColor(); self.window?.makeKeyAndVisible(); let rootViewController = UIViewController() as UIViewController; let navigationController = UINavigationController(rootViewController: rootViewController) as UINavigationController; self.window?.rootViewController = rootViewController; self.window?.addSubview(navigationController.view); return true }
阅读全文
0 0
- Application windows are expected to have a root view controller at the end of application launch
- Application windows are expected to have a root view controller at the end of application launch
- 'Application windows are expected to have a root view controller at the end of application launch'
- Application windows are expected to have a root view controller at the end of application launch
- 'Application windows are expected to have a root view controller at the end of application launch'
- “Application windows are expected to have a root view controller at the end of application launch”
- Application windows are expected to have a root view controller at the end of application launch'
- Application windows are expected to have a root view controller at the end of application launch
- 'Application windows are expected to have a root view controller at the end of application launch'
- Application windows are expected to have a root view controller at the end of application launch
- 'Application windows are expected to have a root view controller at the end of application launch' [
- Application windows are expected to have a root view controller at the end of appliaction launch.
- Application windows are expected to have a root view controller at the end of appliaction launch.
- 关于Application windows are expected to have a root view controller at the end of application launch
- Application windows are expected to have a root view controller at the end of application launch解决方法
- Application windows are expected to have a root view controller at the end of application launch 的解决
- Application windows are expected to have a root view controller at the end of application launch问题分析
- Applications are expected to have a root view controller at the end of application launch
- 架构师之路16年精选50篇
- thinkphp 前置函数参数问题
- 高性能Web架构
- pdf转CAD文件怎么用迅捷CAD转换器转
- Spark SQL 1.6.2官方文档中文版
- 'Application windows are expected to have a root view controller at the end of application launch' [
- ASP.NET Core 运行原理解剖[2]-Hosting补充之配置介绍
- kendoUI 简单增删改查
- 半年总结——燕雀鸿鹄皆有志
- Kafka Manager实现原理与填坑
- 【HDU
- array_map实现将多维数组转换成字符串的简单方法
- 修改navigationbar右侧按钮离屏幕边缘位置
- 第4讲项目-计算两电阻并联后的阻值