Objective C Image Slideshow (longer edition)


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // .h
  2. #import <UIKit/UIKit.h>
  3.  
  4. @interface SimpleViewController : UIViewController {
  5. IBOutlet UIImageView *imageView;
  6. }
  7.  
  8. @property (nonatomic, retain) IBOutlet UIImageView *imageView;
  9.  
  10. @end
  11.  
  12. // .m
  13.  
  14. #import "SimpleViewController.h"
  15.  
  16. @implementation SimpleViewController
  17.  
  18. @synthesize imageView;
  19.  
  20. // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
  21.  
  22. - (void)viewDidLoad {
  23. [super viewDidLoad];
  24. UIImage *image1 = [UIImage imageNamed:@"WELCOME.PNG"];
  25. UIImage *image2 = [UIImage imageNamed:@"SLIDER.PNG"];
  26. NSArray *images = [[NSArray alloc] initWithObjects:image1,image2,nil];
  27. imageView.animationImages = images;
  28. imageView.animationDuration = 10;
  29. imageView.animationRepeatCount = 0;
  30. [imageView startAnimating];
  31. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.