[iPhone SDK] Flip a view in 3D?

Discussion in 'Mac Programming' started by attodorov, Apr 30, 2008.

  1. attodorov macrumors newbie

    Joined:
    Apr 17, 2008
    #1
    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
     
  2. Sbrocket macrumors 65816

    Sbrocket

    Joined:
    Jun 3, 2007
    Location:
    /dev/null
    #2
    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.
     

Share This Page