How can I find out what the image name (usually file name?) loaded into a UIImage instance is? In this case, they were all initWithContentsOfFile:
.
views:
343answers:
2
+1
A:
Once it's loaded using that, you can't. The file name is only used to load the data into memory. After that, it becomes irrelevant.
If you need to maintain the file name, then perhaps you need to make a class with the filename (as an NSString
or NSURL
, perhaps) and the image data (as an NSImage
or NSData
object) as ivars. I'm not sure what your application is, so I can't give you any architectural advice at this point.
Marc W
2009-10-06 02:55:54
A:
It's also something you can't just add a category on UIImage to, unfortunately, because it requires state.
God of Biscuits
2009-10-07 22:58:33