views:

259

answers:

1

Hi everyone,

I am just curious how facebook for iPhone application can display a list of icons with the text, then all the icons shake to allow user to change the position of each item.

What kind of control is that, and is there some sample code that do the same thing?

I think it must be standard because it exists as well in home screen of iPhone and iPod app to choose the tab item.

Thank you.

+1  A: 

It's not a standard control. It's generally implemented with Core Animation and a rotation transform.

Rob Napier
do you have some articles on this topic :d
sfa
I don't know of a public document that walks through this specific example. The BNR iPhone class has a very similar example for a moving-squares puzzle (http://www.bignerdranch.com/classes/beginning_iphone.shtml). The CA Programming Guide is your best bet for an intro to the topic. Pay attention to Transforms (which are how the shapes are jiggled around). You'd want to experiment with Basic Animations and Keyframe Animations to see which works better for you. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreAnimation_guide
Rob Napier
I think the controls from the Three20 projects help ;) http://three20.info/api/TTLauncherView
sfa