Reputation: 133
I wanted to change the default view that loads up in MainWindows.xib. So I added a new instance variable for the class I want to add the view of here is the code in .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;
and then in the MainWidow.xib I changed the class name and xib on the UIView
in the .m
- (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;
}
what am I missing and please explain me why am I getting this error
Upvotes: 0
Views: 127