Matt Gemmell

My new book CHANGER is out now!

An action-adventure novel — book 1 in the KESTREL series.

★★★★★ — Amazon

NSViewAnimation WTF

Development & Source 1 min read

Seriously, what am I doing wrong here? Is the ability of NSViewAnimation to perform multiple animations at once just a cruel and twisted joke?

Download this little sample app (source code included; Tiger only etc) and run it. On my admittedly ageing PowerBook G4 1.67 (and on Lauren’s iBook), it’s jerky as hell - and it’s just animating four little blue square NSViews. It looks like some of the views even lag behind at times.

I really hope I’m just doing something incredibly stupid here.

Update: I created an NSAnimation subclass of my own (MGViewAnimation) to replace NSViewAnimation, which you should be able to drop straight into any existing code which uses NSViewAnimation. You can grab the source code from my Cocoa Source Code page, or you can read more about MGViewAnimation here.