标签:
// // ViewController.m // UIImageView // // Created by City--Online on 15/5/18. // Copyright (c) 2015年 XQB. All rights reserved. // #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; UIImage *img=[UIImage imageNamed:@"2.jpg"]; UIImage *img1=[UIImage imageNamed:@"3.jpg"]; //基本属性 // UIImageView *ImgView=[[UIImageView alloc]initWithImage:img highlightedImage:img1]; // ImgView.frame=[UIScreen mainScreen].bounds; // ImgView.highlighted=YES; // [self.view addSubview:ImgView]; //动画 UIImageView *imgView=[[UIImageView alloc]initWithFrame:[UIScreen mainScreen].bounds]; NSArray *animationImages=[[NSArray alloc]initWithObjects:img,img1, nil]; imgView.highlightedAnimationImages=animationImages; imgView.animationImages=animationImages; imgView.animationRepeatCount=2; imgView.animationDuration=10; // - (void)startAnimating; // - (void)stopAnimating; // - (BOOL)isAnimating; [imgView startAnimating]; [self.view addSubview:imgView]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } @end
标签:
原文地址:http://www.cnblogs.com/cuiyw/p/4511270.html