I have one UIImageView object. With this one object I need to set 12 frames and 12 images. with one object. How?
UIImageView *obj = [[UIImageView alloc]init];
[obj setFrame:CGRectMake(10,20,50,56)];
[obj setImage:[UIImage imageNamed:@"x"]];
this is one image and frame declaration with one o开发者_运维技巧bject. Like this I need to add 12 images and frames with one object.
are you trying to animate? or are you trying to show 12 images simultaneously? If you are trying to animate use GameBit's answer. If you are trying to show 12 images simultaneously you need 12 UIImageView objects. If you want to keep them all together you can add them to a single UIView. Think of it like a container for your ImageViews.
Try using this method: [UIImageView setAnimationImages:]
.
精彩评论