• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What is the likely reason why objects aren't being loaded from a XIB?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >What is the likely reason why objects aren't being loaded from a XIB? (From: G S <email@hidden>)

  • Prev by Date: Re: Why does Xcode define IBOutlet with @synthesize?
  • Next by Date: Getting a UITextview to accept a double tap
  • Previous by thread: Re: What is the likely reason why objects aren't being loaded from a XIB?
  • Next by thread: Getting a UITextview to accept a double tap
  • Index(es):
    • Date
    • Thread