我会这样做
头部接口
int j;
int i;
UIImageView *imgV1;
UIImageView *imgV2;
UIImageView *imgV3;
UIImageView *imgV4;
UIImage *img1;
UIImage *img2;
NSArray *views;
NSArray *imgs;
执行
- (void)viewDidLoad{
i=0;
j=0;
views = [[NSArray alloc] initWithObjects:imgV1, imgV2, imgV3, imgV4, nil];
imgs = [[NSArray alloc] initWithObjects:img1, img2, nil];
[NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(changeImage) userInfo:nil repeats:YES];
}
-(void)changeImage{
UIImageView *imageView = [views objectAtIndex:j];
UIImage *image = [imgs objectAtIndex:i];
imageView.image = image;
i++;
if(i==2){
i=0;
j++;
if(j==4)
j=0;
}
}
希望这会有所帮助(我没有尝试过)