• 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
[iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.


  • Subject: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
  • From: Brian Bruinewoud <email@hidden>
  • Date: Sat, 8 Aug 2009 18:23:16 +1000

Hi,

I'm a little confused about how this code works:

MyController *myController = [[ myController alloc ] initWithNibName: @"myView" bundle: nil ];
[[ self navigationController ] pushViewController: myController animated: YES ];
myController.myProperty = itsValue;
[ myController release ];


I always see the view set-up code (in this case "myController.myProperty = itsValue") after the view has been displayed. It makes more sense to me to set up the view before calling pushViewController but this doesn't work. For example, if myProperty has a non-synthesized setter that expects IBOutlets to be bound it will be disappointed as they'll still be nil at this point.

So, my questions are:

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?


Similar situation with the call to makeKeyAndVisible - I've seen samples of applicationDidFinishLaunching where makeKeyAndVisible is called and then set up is done to the main window's view.

Thanks,
Brian.

_______________________________________________

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


  • Follow-Ups:
    • Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
      • From: "Henry McGilton (Boulevardier)" <email@hidden>
    • Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
      • From: Luke the Hiesterman <email@hidden>
    • Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: How to change to the smoother single-stage animation
  • Next by Date: Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
  • Previous by thread: Re: [myNSWindow setDocumentEdited:dirtyB] fail ??
  • Next by thread: Re: [iPhone 3.0; XCode 3.1.3] Question about when views are available for manipulation.
  • Index(es):
    • Date
    • Thread