- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Stack Overlow 上有一些关于此错误的问题,但似乎没有一个解决方案对我有用。有人能看一眼我的代码,看看我为什么会收到以下错误吗?
Applications are expected to have a root view controller at the end of application launch
AppDelegate.m:
#import "AppDelegate.h"
#import "ViewController.h" //import header file
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIStoryboard* sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController* viewController = [sb instantiateViewControllerWithIdentifier:@"viewController"];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
@end
最佳答案
您将 rootViewController
设置为 self.viewController
但您从未设置 self.viewController
。
试试这个:
self.viewController = [sb instantiateViewControllerWithIdentifier:@"viewController"];
self.window.rootViewController = self.viewController;
关于ios - 关于在应用程序启动结束时有 Root View Controller 的错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23532115/
我最近遇到了难以追踪段错误的问题。奇怪的是,它让我可以很好地访问数组,但由于某种原因,它不允许我在不导致错误的情况下释放它。我测试了所有内容以确保不是其他任何问题,因此我可以 100% 肯定地说它只发
我想让 2 个查询出现在一个具有 2 个字段的结果表中。错误答案和正确答案。 错误答案查询: select count(ma_id) as wrong_answers from exercicio n
我不确定我是否可以在这里展示任何可重现的示例,但是让我讲述我在使用 Shiny 应用程序时遇到的问题。 我有一个 Shiny应用程序,基本上是数据驱动的。我所有需要的数据都保存在 RData 中放置在
在 iOS6 中有 AutoLayout,这是一个基于约束的布局系统。我猜它有点类似于 Android 的灵活 XML 布局。 我正在启动一个 iOS6 项目,希望您使用 AutoLayout。这个应
我正在使用 figure 和 figcaption 将标题过渡到图像上,并且过渡工作正常,但 figcaption 背景位于实际图像之外几个像素(顶部)。 我查看了我的代码并更改了边距、填充和位置设置
我在我的项目中添加了一个数据库,然后我想添加一个 Controller 。 当“添加 Controller ”窗口弹出时,系统会要求我选择数据上下文类。 令人惊讶的是,我发现有2个上下文类:一个叫做:
我在我的应用程序中使用 Angular 和 NodeJS。现在,我将 pdf 文件存储在 gcp 云存储桶中,并通过使用 Nodejs 中的 getSignedUrl 方法获取 pdf 文件的 url
我是一名优秀的程序员,十分优秀!