Re: How are views supposed to reload after being nillified by memory warnings?
Re: How are views supposed to reload after being nillified by memory warnings?
- Subject: Re: How are views supposed to reload after being nillified by memory warnings?
- From: G S <email@hidden>
- Date: Tue, 28 Feb 2012 22:36:38 -0800
The Apple doc says,
"If the view controller has an associated nib file, this method loads the
view from the nib file. A view controller has an associated nib file if the
nibName<https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/nibName>
property
returns a non-nil value, which occurs if the view controller was
instantiated from a storyboard, if you explicitly assigned it a nib file
using the initWithNibName:bundle:<https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instm/UIViewController/initWithNibName:bundle:>
method,
or if iOS finds a nib file in the app bundle with a name based on the view
controller’s class name. If the view controller does not have an associated
nib file, this method creates a plain
UIView<https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/cl/UIView>
object
instead."
So I did override loadView, simply to write to a log and then call [super
loadView]. In the log, I verified that the controller's loadView method IS
being called after the overlapping view is dismissed. I also verified that
the object's nibName property contains the name of the XIB it's initialized
with. So it should be reloading from this XIB. Instead, however, I'm
getting the "plain" (blank) view.
_______________________________________________
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