The method
[UIImage imageNamed:@""]
caches the image. The UIImageView doesn't. I had a problem in an app with a lot of images that was crashing due to low memory.
To fix if I changed to [UIImage imageWithContentsOfFile:@""]
that does not caches the image.
To pre-cache the image you can simply call [UIImage imageNamed:@""]
for all images you want in the init method. But if you receive a memory warning the images gonna be deallocated.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…