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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to