views:

196

answers:

2

Hey all,

I'm trying to create a simple iPhone input device shaped like a disk, ony half of which is viewable on screen. The idea is this disk would be spun, and the selection would be the menu item in the middle when the disk stops spinning. Any idea what the best way of implementing such a thing would be? I'm reading up on Quartz2D and CoreAnimation right now, but am unsure as to how to proceed.

I only need this for one app, so would it make more sense to prerender the whole shebang in photoshop and then rotate it with CoreAnimation, and have some mechanism to track which portion of the disk is in the 'middle' (e.g. which menu item is selected)? Or is there a more general, easier way? (I must be missing something...)

cheers -eli

A: 

You've basically got the right idea. CoreAnimation makes it easy to "spin" layers with AffineTransforms.

You could do it with generic UIViews as well. They also support transforms. It probably doesn't matter, but for a GUI element, the UIVIew objects work well.

Kailoa Kadano
A: 

If you want a "fast" spin (motion blur, etc), it will probably be easier to prerender the thing

Alex