I have a need to synchronize the actual display update of a UIView hierarchy 
with real time. In my case, I update the display once per second, and I want 
the display to update *on* the second.

Since I don't really have control of when the draw happens, I don't know how to 
do this. I update all the various UILabels in my view, and then exit the 
current iteration of the run loop. Some time later iOS completes drawing and 
the display updates.

If I knew how long this takes, I could calculate when I need to start drawing, 
and adjust my timer accordingly.

Note that the precision of all this isn't so high as to make this "hard" real 
time. It just has to be good enough that a person watching the display and 
comparing it (visually) to an accurate clock would consider them to be 
synchronized. I'd like to do no worse than 100 ms.

Any ideas?

TIA,
Rick

_______________________________________________

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