views:

37

answers:

1

This is a basic question about navigation controller, however, I don't seem to get it right.

I am creating a basic navigation controller application and using my custom view instead of the default rootviewcontroller and rootviewcontroller.xib that are automatically generated.

Here is what I have done:

Opened the MainView.xib and deleted the rootviewcontroller

Then, Xcode->new file->UIViewController class (with xib) and named it test

Opened mainview.xib, clicked on the section where it was pointing to rootviewcontroller and in inspector, changed the xib to test

In test, I just added a button.

However, when I load the application, the test doesn't seem to load. I added a log statement for viewdidload just to verify and the statement is never logged. Please let me know the fundamental connection I am missing here.

+1  A: 

You must change the class of the RootViewController to your own (Inspector -> CMD+4).

unset
Thanks, I didn't realize that I need to have a view controller under navigation controller, brought back the deleted rootviewcontroller and linked to my file and it worked.
Kiran