开发者

Will saved images have tag properties with them when I load them back?

开发者 https://www.devze.com 2022-12-17 14:46 出处:网络
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 termina开发者_StackOverflowtion of the app, then load them back whe

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 termina开发者_StackOverflowtion of the app, then load them back whe the app loads and extract them from the array, and still have them have the tags.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消