Jun 03
I’ve been scratching my freaking head for an hour trying to figure out how to load an image from my application’s bundle. Doing this in Interface Builder is easy as pie, but not so straightforward.
[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@”thefilename” ofType:@”jpg”]];
Easy, isn’t it?
July 16th, 2009 at 12:10 am
Thanks. You’re the first hit from “UIImage load bundle” and told me exactly what I needed.
Tom
July 16th, 2009 at 8:40 am
Glad I could help!
May 16th, 2010 at 1:16 pm
Great stuff, spot on here too!