Animated images.

Discussion in 'iOS Development' started by CoocooForEricpuffs, Feb 21, 2009.

  1. CoocooForEricpuffs

    CoocooForEricpuffs Banned

    Joined:
    Feb 11, 2009
    Messages:
    13
    Likes Received:
    0
    Do .gif's work in the SDK? That'd be awesome. If not, how would I get about 4 png's to get animated and loop? Same with music. :]
  2. lauNchD

    lauNchD Well-Known Member

    Joined:
    Jan 27, 2008
    Messages:
    1,844
    Likes Received:
    261
    Device:
    iPhone 5 (Black)
    UIImageView has an animation function which lets you set an array of images to animate, the duration, and repetition (if it loops infinitely). Look it up in the documentation, because I don't know the exact methods.

    If you want to play music (as in: no alert sounds but REAL music, potentially with play/pause control), AVAudioPlayer is your best bet. You have to link to the AVFoundation framework. You can specify a URL your sound file is in, and simply play it! The other alternative is using AudioQueue and having to manually create an audio stream (manually decode and play every audio packet) and having your app bugged up! The only downside about AVAudioPlayer is that it only became available on 2.2, so you have to require 2.2 if you want to use it.
  3. hitman2992

    hitman2992 New Member

    Joined:
    Dec 10, 2007
    Messages:
    123
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
  4. ZunePod

    ZunePod Banned

    Joined:
    Aug 28, 2008
    Messages:
    1,340
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
  5. omokas

    omokas Member

    Joined:
    Feb 5, 2009
    Messages:
    712
    Likes Received:
    5
    Device:
    iPhone 4 (White)
    Yeah with vwallpaper via cydia

Share This Page