How to find out whether an image exists within a bundle?

Posted by cannyboy on Stack Overflow See other posts from Stack Overflow or by cannyboy
Published on 2010-06-10T04:20:31Z Indexed on 2010/06/10 5:02 UTC
Read the original article Hit count: 197

I have an array of NSStrings:

Flower
Car
Tree
Cat
Shoe

Some of these strings have images associated with them; some don't. I can build an image name by appending .png to the name (e.g. Flower.png).

How do I check whether that image actually exists within the bundle before I try to load it into the view?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c