XCode 4.5.1,应用程序窗口应在应用程序启动结束时具有根视图控制器 [英] XCode 4.5.1, Application windows are expected to have a root view controller at the end of application launch
问题描述
我已将 XCode
升级为 4.5.1
,以便使用<$在我的新iPad中进行调试c $ c> IOS 6.0.1 。
之后我在编译后在控制台上遇到这个错误:
I've upgraded my XCode
to 4.5.1
in order to debug in my new iPad with IOS 6.0.1
.
After that I get this error on console after compiling:
应用程序窗口最后会有一个根视图控制器应用程序启动
Application windows are expected to have a root view controller at the end of application launch
我的应用程序进入与主屏幕不同的屏幕,按钮根本不起作用。
And my application enters in a screen different from the main and the buttons do not work at all.
在旧版本的 XCode
中,它可以作为魅力。
In the older version of XCode
it worked as a charm.
有关正在发生的事情的任何想法?
Any ideas of what is happening?
在应用代表我有这个:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Add the view controller's view to the window and display.
[self.window addSubview:viewController.view];
[self.window makeKeyAndVisible];
return YES;
}
只是为了更新,我能得到的唯一方法我的应用程序再次删除Xcode 4.5.1并返回到Xcode 4.4.1。 .xib文件中似乎存在问题,并且界面构建器无法正确链接最新版本中的对象。我不知道为什么
Just to update, the only way I could get my app again was to delete Xcode 4.5.1 and go back to Xcode 4.4.1. There seems to be a problem in the .xib file and interface builder cannot link properly the objects in the newest versions. I don't know why
一个有趣的事实,在我更新XCode之前我无法使用ios 6.0在ipad上运行我的应用程序.1(我正在为IOS 5.1编译)
降级后它可以工作。
A funny fact, before I updated the XCode i could not run my app on the ipad with ios 6.0.1(I was compiling for IOS 5.1) After the downgrade it works.
推荐答案
转到AppDelegate类并且添加:
Go to AppDelegate class and add:
self.window.rootViewController = self.viewController;
这篇关于XCode 4.5.1,应用程序窗口应在应用程序启动结束时具有根视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!