ios - How to rearrange UIImages? -
I am creating an app where I am adding some UIImages as a subview of UIview. Now if I delete the image, then I want to rearrange remaining UIImages.
How can I get this?
Edit
This is what I have tried so far:
for (int i = 0; I & lt; [Array count]; i ++) {id = Dictionary = [array object atindex: I]; UIImageView * imageView = [[UIImageView alloc] initWithFrame: CGRectMake (20, 100 * i + 100, 60, 60)]; [ImageView setbackgram color: [UIColor clearColor]]; [ImageView set tag: I + 1]; [Imagesresad object: image view]; [Self.view addSubView: imageView]; }
Add and declare all of you to NSMutableArray
NSMutableArray
h file
self.imagArray = [[NSMutableArray alloc] init]. [Self Imig array add object: [UIImage image W. Names: @ "Image 1 page"]; . . . . [Self. Imagare add object: [UIImage imageWithName: @ "image_N.png"];
and you can easily manage / delete the image by self.imagArray
.
Write this code if you want to delete any image
[self.imagArray removal object-end index: indexed];
Comments
Post a Comment