How Does IB Load a UIImage: imagedNamed vs imageWithData?
Aft开发者_运维百科er reading the memory management for UIImage, I'm worried about how interface builder loads an UIImage. Does it use UIImage:imagedNamed or UIImage:imageWithData?
See relevant section in "Resource Programming Guide":
When you load a nib file that contains references to image and sound resources, the nib-loading code caches resources whenever possible for easy retrieval later. For example, after loading a nib file, you can retrieve an image associated with that nib file using the imageNamed: method of either NSImage or UIImage (depending on your platform).
So it looks like it uses imageNamed:
or some underlying internal routines.
Edit: You may also be interested in this post about +imageNamed
精彩评论