ios - i want show different images continuously without user touch the button -


When touching a button, show the image to the code below. I can say "without a bear, cat, cow, dog" Anyone can touch the user's touch button

  NSMutableArray * dashBoy = [NSMutableArray array]; For (i = 1; i & lt; = 12; i ++) {butterfly = [NSString stringWithFormat: @ "bear_% d.png", i]; If ((image = [UIImage imageNamed: butterfly])) [dashBoy addObject: image]; } [StgImageView Set Animation Images: DashBoy]; [StgImageView Set Animation Duration: 4.0F]; [Set the StgImageView animation annotation: 2]; [StgImageView start-up];    

You can do this as: -

First of all, create a UIImageView property below,

  @property (nonatomic, weak) IBOutlet UIImageView * imageView; // Also connect it with Storyboard or EXib   

Then you can type the IBAction given below: -

  - (IBAction) startTap: (ID) Sender {{self.imageView Set Animation Duration: 1.0f]; // You can change the duration of the intensity or slow-making animation [Self.imageView Set Animation Images: Image Array]; // ImageArray has pictures of NSERA in which you want to show a slide show. [Self.imageView startAnimating]; // Just to start the animation} - (IBAction) stoptap: (ID) sender {[self.imageView stopAnimating]; To Stop Animation    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -