• 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
Re: Why can't a modal view controller present another in viewDidLoad?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why can't a modal view controller present another in viewDidLoad?


  • Subject: Re: Why can't a modal view controller present another in viewDidLoad?
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 17 Jan 2011 10:13:44 -0800

On Jan 16, 2011, at 7:46 PM, Luke Hiesterman wrote:

> Delayed performance is not appropriate for something like this, because that fact that your view was just loaded is not a guarantee that it's about to be added to the view hierarchy. Delayed performance should not be used as a haphazard crutch because it seems to make a given problem go away. It should only be used when the problem and the purpose of the delayed perform are both well understood.
>

Yes, fair enough. There are a lot of indeterminacies in the framework - for example, it might perform an animation for whose finish you get no notification, or you might need to wait until after the next "redraw moment" (as I call it) - and one gets into the habit of using delayed performance as a way of skirting these. But I certainly see why this is a different sort of case. m.


> On Jan 16, 2011, at 6:46 PM, Matt Neuburg <email@hidden> wrote:
>
>> On Sun, 16 Jan 2011 13:47:06 -0800, G S <email@hidden> said:
>>> On Sun, Jan 16, 2011 at 11:47 AM, Luke Hiesterman <email@hidden> 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.
>>
>> Or just use delayed performance. I use delayed performance a *lot*. Like whipped cream, it covers a multitude of sins. m.

--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com


_______________________________________________

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

References: 
 >Re: Why can't a modal view controller present another in viewDidLoad? (From: Matt Neuburg <email@hidden>)
 >Re: Why can't a modal view controller present another in viewDidLoad? (From: Luke Hiesterman <email@hidden>)

  • Prev by Date: How to correctly load the bundle of a screen saver (was: How to change the product name with command line builds?)
  • Next by Date: Re: NSNotFound
  • Previous by thread: Re: Why can't a modal view controller present another in viewDidLoad?
  • Next by thread: UIImagePickerController is permanently blowing away the phone's own status bar.
  • Index(es):
    • Date
    • Thread