MatterGoal MatterGoal - 4 months ago 9
iOS Question

Load image from bundle with IOS

I added to my project a .bundle folder filled with some images.
Is it correct refer to this image directly writing something like ?:

[UIImage imageNamed:@"imageInBundle.png"];


Which is the best method to access and use these images ?

Joe Joe
Answer

That is correct, imageNamed: will search your main bundle. Images in your project, even if they are in different groups in your Project Navigator will be in your main bundle and can be accessed directly by name.

Comments