Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

attodorov

macrumors newbie
Original poster
Apr 17, 2008
5
0
Hi guys,

Is it possible with the SDK to automatically animate a view and flip it 180 degrees ? Examples are :

1) when one is in a phonecall, and taps the "keypad" icon, it revolves and displays the keypad, then when one taps "hide keypad" , it returns to the original state

2) in the iPod App, when the device is in landscape mode, and the current album is shown, tapping on the album shows the songs in the album (i am walking about the actual effect when the view is revolving/flipping around).

I know this is possible using OpenGL ES, but I am sure there could be some easier out-of-the-box way to do this effect?

Thanks.

Angel
 
Take a look at the TheElements example on the iPhone dev center, it includes code for animating this in one of the classes. And you're correct - it is very simple.

Edit: Specifically, you want to look at the flipCurrentView method of AtomicElementViewController.m. It uses the UIView animation blocks which, frankly, are the easiest way to get animations from the Quartz framework.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.