Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
- Subject: Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
- From: Luke the Hiesterman <email@hidden>
- Date: Sat, 8 Aug 2009 06:35:30 -0700
On Aug 8, 2009, at 1:23 AM, Brian Bruinewoud wrote:
Why doesn't initWithNibName create and bind all the IBOutlets before
it returns?
Is the view guaranteed to be visible after pushViewController returns?
Or is it still animating on another thread?
Or is the request to display the view merely queued for the next
loop through the RunLoop?
Kyle already answered the question about lazy nib loading. I'll answer
the others by saying no, you shouldn't expect the view to be displayed
after calling pushViewController. I KNOW that it's not displayed
immediately if you call pushViewController:animated:YES. I don't
recall off the top of my head if it will display immediately with
animated:NO, but you definitely should not rely on that either way.
You should be overriding methods from UIViewController to accomplish
the kind of setup you're talking about. It sounds like viewDidLoad is
probably what you want. If you override this method, it will give you
an opportunity to setup properties after the view controller's view
has loaded. Alternatively, there is viewWillAppear: and viewDidAppear:
that let you do things right around the actual display of the view.
Luke
_______________________________________________
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