Re: What is the likely reason why objects aren't being loaded from a XIB?
Re: What is the likely reason why objects aren't being loaded from a XIB?
- Subject: Re: What is the likely reason why objects aren't being loaded from a XIB?
- From: G S <email@hidden>
- Date: Fri, 23 Sep 2011 22:38:47 -0700
Thanks for the responses. The problem turned out to be that my view
controller's parent class had defined loadView, which didn't call the
base (UIViewController) loadView (and indeed, the documentation says
that a loadView method should NOT call the base).
Thus the XIB-loading mechanism was never called. Eliminating the
overriding loadView method did fix the problem when instantiating from
a XIB.
The Apple doc says you should never call loadView explicitly, and
never override it if your view controller's being loaded from a XIB.
So it's impossible to have a view controller that can be instantiated
both programmatically and from a XIB?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden