当我的应用程序启动时出现上述错误。以下代码来自我的 AppDelegate .h 文件
#import <UIKit/UIKit.h>
@interface TableViewAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
UINavigationController *navigationController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@end
以下来自我的AppDelegate实现文件.m applicationdidfinishlaunchingwithoptions
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//Configure and show the window
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
return YES;
}
将其添加到您的应用程序委托中:
self.window.rootViewController = navigationController;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)