Fritz Anderson's comments are very important, in that you do not control the state of your animation in the drawRect: but instead handle that from a calling method (like the one in your controller which is called from your timer). drawRect: is not fully under your control nor should you try to do so.
The documentation for animations states that for very simple work you should use the NSTimer, else use NSAnimation. I went for NSTimer first because I got so used to them in my previous development environment, but I was not happy with the fastest speed at which it would allow me to fire the timer, and they way it blocked my user interface. I swapped it for an NSAnimation, and it all worked beautifully after that. Mind you, I do not use full blown animation, I just abuse the NSAnimation as a timer, just like the NSTimer, but without the downsides. I am very new to Objective-C and Cocoa/Cocoa Touch, so you should listen to more advanced people on this list. But, I will tell you what I found to be effective and NSAnimation was very effective. And to see how I did this, I suggest you watch my small movie about this project: http://www.youtube.com/watch?v=jKg1Fy-LKVY [[[Brainchild alloc] initWithName:@"Richard Altenburg"] saysBestRegards]; Op 6 jul. 2012, om 22:02 heeft Charlie Dickman het volgende geschreven: > I just had a look at the NSAnimation class document and it actually suggests > very prominently that, because of the limited capabilities of an NSAnimation, > an NSTimer be used. _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com