In previous iOS SDK, [UIImage imageNamed:]
can determine the image to load automatically without giving the file extension, for example:
[ivTest setImage:[UIImage imageNamed:@"testImage"]];
It will search for appropriate image to load (i.e. testImage.jpg
& [email protected]
). But for iOS 8, it sometimes cannot identify the correct image to load, and just returns null
.
I have to specify the extension:
[ivTest setImage:[UIImage imageNamed:@"testImage.jpg"]];
But this happens only in same rare cases.
Given that I have only the following images in the project:
- testImage.jpg
- [email protected]
No other images with similar names. How can I prevent this? Should I specify extension for all my imageNamed:
?