如何将四个图像放在 UIImageView 数组中?为什么我的forloop不能运行?
如果我想用四个图像创建四个帧,该怎么做?
NSArray *photos = [NSArray arrayWithObjects:
[UIImage imageNamed:@"1.jpg"],
[UIImage imageNamed:@"2.jpg"],
[UIImage imageNamed:@"3.jpg"],
[UIImage imageNamed:@"4.jpg"],nil];
for(int i=0;i<5;i++)
{
UIImage *image = [UIImage imageNamed:[photos objectAtIndex:i]];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
}