Reputation: 7857
I've created a UIViewController and xib for a login screen. It has now occurred to me that my UIViewController actually needs to be a UINavigationController. I want to push a logged in screen once the login happens and have the back button as a logout button going back to the login screen
The problem I have is that when I change my controller header from
@interface AccountView : UIViewController
to
@interface AccountView : UINavigationController
All of the assets in my nib such as textfields dont show up anymore.
Could sombody explain this to me?
Upvotes: 1
Views: 464
Reputation: 17732
While the navigationcontroller is a type of viewcontroller, it is not intended to be used all on its own. What you're better off doing, is simply leaving everything exactly the way you had it, and create a new UINavigationController to wrap around it.
Upvotes: 3