On Jan 16, 2011, at 8:47 PM, Luke Hiesterman wrote: > viewDidLoad is called the first time the view property of the vc is accessed > - that's when loading happens. There is no guarantee that the view is in a > window at that time, and presenting a modal vc on a vc whose view is not in a > window does not make sense. Perhaps viewDidAppear is what you were looking > for. Where does the documentation say you can do this in viewDidLoad?
I think he meant that you can put 2 modal views one on top of each other, not that he can load them from the viewDidLoad method. G. > > Luke > > Sent from my iPhone. > > On Jan 16, 2011, at 11:33 AM, G S <[email protected]> wrote: > >> Hi all. >> >> The Apple doc says this is possible, but it doesn't work when you want >> the second modal view controller presented immediately. If you >> present a modal view controller that immediately presents another one >> in its viewDidLoad method, the second one never shows up. No errors >> are reported, so what's going on? >> >> A workaround I've seen people use (which does work) is to have the >> ultimate parent instantiate all of the children's modal views, but >> that requires every parent to determine (in advance) every view >> controller in the hierarchy; obviously that's poor practice. For >> example, this works: >> >> [self presentModalViewController:newPictureController animated:NO]; >> [self.newPictureController >> presentModalViewController:newPictureController.picker animated:YES]; >> >> This makes it impossible to create controllers that manage their own >> modal views upon instantiation. Should the failure to show a modal >> view controller from viewDidLoad be regarded as a bug in the SDK? >> Anybody have a solution? >> >> Thanks! >> >> Gavin >> _______________________________________________ >> >> Cocoa-dev mailing list ([email protected]) >> >> 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/luketheh%40apple.com >> >> This email sent to [email protected] > _______________________________________________ > > Cocoa-dev mailing list ([email protected]) > > 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/gustavxcodepicora%40gmail.com > > This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
