I have images in my project (which is only supported on iPhones, no iPads). The images are under a group and not under images.xcassets.
I want to use the same image for all iPhones, except the @3x for the 6 Plus, so I have a structure as follows:
Project |_ Images_Group | |_ [email protected] |_ [email protected] I am using this code to use it in my app:
if let path = NSBundle.mainBundle().pathForResource("pic01", ofType: "png") { image = UIImage(contentsOfFile: path) } But path always returns nil. Do I need to have pic01.png?
The image is present under Project > Build Phases > Copy Bundle Resources. What am I doing wrong?