imageNamed vs imageWithContentsOfFile

In short imageNamed cache’s your images and never frees it from memory but does provide faster loading of images second time around as they are cached.

imageWithContentsOfFile does not cache images and is more memory friendly however as it does not cache images and they are loaded much slower.

Good link with an explanation of the 2

http://xcodenoobies.blogspot.com/2011/02/best-way-to-use-uiimageview-memory.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s