views:

15

answers:

0

Hi

For my iPhone app I'm creating some rotating gears with the help of some subclassed UIViews.

I have created subclasses that rotate themselves triggered by a timer.

In one place I have one of these subclasses within another one (so rotation within rotation, think moon rotation around earth and it's own axle). It all rotates fine and dandy, but sometime, like once or twice a minute, I see a very quick white blink in the area of the UIViews. Sometimes in the upper half, sometimes in the lower one and sometimes the whole area (which is only about 128 x 128 pixels).

I rotate by using CGAffineTransformMakeRotation.

I guessed it was due to performance problem, but after simplifying images (no more photoshop made drop shadows in PNG for example) and reducing the number per second the timer is called (2 times per second instead of 5) I still have the problem. CPU load is now down to between 9-25% (from around 47%) when measured in Instruments on a iPhone 3G. Still blinking!

Any clues on where to begin troubleshooting or any better way to rotate images within a view?

All ideas appreciated!