Skip navigation.
 
mlRe: Deferring a selector until later, but before painting
FROM : Ken Ferry
DATE : Thu Mar 06 08:32:01 2008

On Mar 5, 2008, at 5:41 PM, j o a r <<email_removed>> wrote:

>
> On Mar 6, 2008, at 2:12 AM, John Stiles wrote:
>

>> Right now in my app, there are some controls which appear and then 
>> their state changes a fraction of a second later, and I'd like to 
>> avoid the visually jarring "pop" effect of a control which changes 
>> itself right after first appearing, but I can't find an easy way to 
>> avoid deferring some operations.

>
>
> How about delaying adding the control until the value you want to 
> display in the control is "ready"?


Or can you do your final setup in -viewWillDraw?

For some kinds of problems, you could synchronously mark whatever 
state you're interested as invalid, then resolve any invalidated state 
in -viewWillDraw.  This would be an appropriate way to do deferred 
layout, for example.

-Ken