Tutorial details

Creating An Animation  | App Code for Sale | Preview

Creating An Animation | iOS Tutorial

How to create an animation by the simple press of a button

Overview PAGE TOP

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

In this tutorial i will be showing you how to create an animation by the simple press of a button

Features:

  • 1 round rect button
  • 2+ images
  • 1 UIImageView

The animation works by playing your images one after another at the speed and duration you have set once pressing the button, 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;
}
-(IBAction)start:(id)sender;
@end

ViewController.m PAGE TOP

@implementation ViewController
-(IBAction)start:(id)sender
{
animation.animationImages = [NSArray arrayWithObjects:
 [UIImageimageNamed:@"chicken1.tiff"],
 [UIImageimageNamed:@"chicken2.tiff"],
 [UIImageimageNamed:@"chicken3.tiff"],nil];
[animationsetAnimationRepeatCount:0];
animation.animationDuration = 1;
[animation startAnimating];
}
@end

Reference PAGE TOP

http://www.geekylemon.com/WEBPROTECT-xcodeanimation.htm

0 Comments Leave a comment

Please login in order to leave a comment.

Newest first
!

Sign-in 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.