views:

21

answers:

1

I have 3 UIImageViews, and they all have tags 1, 2, 3, and are inside of an NSMutableArray. I want to save the images to a file upon termination of the app, then load them back whe the app loads and extract them from the array, and still have them have the tags.

A: 

Typically you would persist the UIImage object, but the tag is in the UIImageView object.

I would recommend handling the tag separately. For example, you could store it as part of the file name and then restore it when loading the images.

gerry3
How would I save the tag as part of the file name. That would really be a LARGE help to me. Please!
Jaba
The tag is just an integer: NSString *fileName = [NSString stringWithFormat:@"image%d.png",imageView.tag];
gerry3