Tutorial details

Auto Playing Animations | App Code for Sale | Preview

Auto Playing Animations | iOS Tutorial

How to auto play an animation

Overview PAGE TOP

Reference: http://www.geekylemon.com/WEBPROTECT-xcodetutorialautoanim.htm

In this tutorial i will be showing you how to auto play an animation


  • 1 Animation image
  • 1 UIImageView

The animation works by playing your images one after another at the speed and duration you have set, The images appear in the UIImageView and will disappear once finish unless set not too

ViewController.h PAGE TOP

@interface ViewController :UIViewController {
IBOutlet UIImageView *animation;

ViewController.m PAGE TOP

@implementation ViewController
-(void)viewDidLoad {
animation.animationImages = [NSArray arrayWithObjects:
                                 [UIImage imageNamed:@"ball1.gif"],
                                 [UIImage imageNamed:@"ball2.gif"],
                                 [UIImage imageNamed:@"ball3.gif"],
                                 [UIImage imageNamed:@"ball4.gif"],
                                 [UIImage imageNamed:@"ball5.gif"],
                                 [UIImage imageNamed:@"ball6.gif"],
                                 [UIImage imageNamed:@"ball7.gif"],
                                 [UIImage imageNamed:@"ball8.gif"],
                                 [UIImage imageNamed:@"ball9.gif"],nil];
    [animation setAnimationRepeatCount:0];
animation.animationDuration = 1;
    [animation startAnimating];

Reference PAGE TOP


0 Comments Leave a comment

Please login in order to leave a comment.

Newest first

to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.