The 'rootVIEwController' outlet of UIWindow is not available on releases prior to iOS 4.0. Remove the connection and instead programmatically add the vIEw controller's vIEw to the window after the application finishes launching.
我是如何以编程方式执行此 *** 作的?
解决方法 让我们假装你有一个CoolVIEwController类.在你的CoolAppDelegate.h中你需要有这样的东西:
@class CoolVIEwController;@interface CoolAppDelegate.h : NSObject <UIApplicationDelegate> { UIWindow *window; CoolVIEwController *vIEwController;}
然后你的CoolAppDelegate.m将需要
application:applicationdIDFinishLaunchingWithOptions:
使用如下代码的方法:
- (BOol)application:(UIApplication *)application dIDFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // OverrIDe point for customization after app launch. // Add your cool controller's vIEw to the window. [window addSubvIEw:vIEwController.vIEw]; [window makeKeyAndVisible]; return YES;}
为避免错误,您可能还需要删除对IBOutlet的引用,该引用通过Interface Builder指向.xib文件中的rootVIEwController.
总结以上是内存溢出为你收集整理的iphone – UIWindow的’rootViewController’出口在iOS 4.0之前的版本上不可用全部内容,希望文章能够帮你解决iphone – UIWindow的’rootViewController’出口在iOS 4.0之前的版本上不可用所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)