In a document-based app my custom view draws some thousand paths in drawRect: with a good performance. Now I'd like to offer a "slow-motion" animation, so the user can actually watch the paths being drawn (not each single one, but e. g. in steps of 100 paths per sec).
I though of several approaches and all of them seem to be infeasible: 1. Sleeping the drawing loop in drawRect: (or make the runLoop wait for some time) and use [... flushGraphics]: Freezes the GUI, as the app is single-threaded 2. Moving the drawing in a 2nd thread and then pause this one: AFAIK is drawing in a second thread not allowed in Cocoa 3. Limit the drawing loop to an increasing high bound, and setup a timer to fire [self setNeedsDisplay:YES] periodically: Causes the first x paths being redrawn at each animation step, resulting in a bad performance 4. Same approach, but skipping the first x paths in the next animation step: Corrupted display, e. g. while resizing in an animation I'm racking my brains over this, any suggestions? Mattes _______________________________________________ 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