我想更改在 MainWindows.xib 中加载的默认视图。所以我为要添加的类添加了一个新的实例变量,这里的视图是.h中的代码
@class Table;
@interface GameUIAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
Table *viewController; //changed the class
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet Table *viewController;
然后在 MainWidow.xib 我更改了 UIView 上的类名和 xib
在他们中
- (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]; //error here
[self.window makeKeyAndVisible];
return YES;
}
我错过了什么,请解释我为什么会收到此错误