Reference: http://www.geekylemon.com/WEBPROTECT-xcodefallingimage.htm
In this tutorial i will be showing you how to make an image fall down the screen
Features:
With this cool feature it can brighten up and screen with funky menus or even games, with a falling image you can set theme like making it snow or even rain you can really have a lot of fun with this code
@interface ViewController :UIViewController { IBOutlet UIImageView *image; NSTimer *moveObjectTimer; } @end
@implementation ViewController -(void) viewDidLoad { moveObjectTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:selfselector:@selector(moveObject) userInfo:nil repeats:YES]; } -(void) moveObject { image.center = CGPointMake(image.center.x, image.center.y +5); } @end
http://www.geekylemon.com/WEBPROTECT-xcodefallingimage.htm
Please login in order to leave a comment.