How to animate stuff when using -drawRect: ?

Posted by mystify on Stack Overflow See other posts from Stack Overflow or by mystify
Published on 2010-04-25T15:34:19Z Indexed on 2010/04/25 16:13 UTC
Read the original article Hit count: 225

Filed under:

I didn't use subviews but painted my things with -drawRect: inside an UIView subclass. Now I want to do some animations in there.

I guess that I can't count on core animation now since I have no subviews. So how would I animate then? Would I set up a timer which fires like 30 times per second? How would I know the animation step? Would I make an ivar which counts the frame of the animation so that I can do my stuff in -drawRect as it gets called?

© Stack Overflow or respective owner

Related posts about iphone