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.
views:
21answers:
1
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
2010-01-15 14:20:35
How would I save the tag as part of the file name. That would really be a LARGE help to me. Please!
Jaba
2010-01-15 14:25:27
The tag is just an integer: NSString *fileName = [NSString stringWithFormat:@"image%d.png",imageView.tag];
gerry3
2010-01-15 15:17:04