I know that there are several questions asking the same thing, but none of their solutions worked for me.
I made my own class viewController (Home), and I made .xib separately. (In fact, I will have 2 tips - one for loading the ipad and one for the iphone).
When I try to instantiate a home class, I got the error that I mentioned in the question.
In the xib file, all I did was drag the viewcontroller object from the library onto the screen, and it automatically added a viewcontroller icon below the file owner and the first responder. Then I went into the inspector of the viewController object and changed the class from viewController to Home.
The next step that I determined from the solutions is to connect the output for viewing from the inspector. I'm not quite sure what I should connect to. The solutions I found say to connect it to the view icon, but again, all I see is the owner of the file, the first responder and the vc object. He does not connect with any of them.
Here is what I added to the application delegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { Home *homePage = [[Home alloc] initWithNibName:@"HomeIpad" bundle:nil]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:homePage]; [self.window addSubview:navController.view]; [self.window makeKeyAndVisible]; return YES; }
objective-c interface-builder nib
Mahir Aug 18 '11 at 6:11 2011-08-18 06:11
source share