Reputation: 71
When I put my images in the playingwithcontainerviews folder, they show up on my app. When I put my images in my imagesofcuteanimals folder, they don't. I have targets selected for the folder. This is the error: Could not load the “” image referenced from a nib in the bundle with identifier.
Upvotes: 0
Views: 1112
Reputation: 100503
The blue folder is reference type when you load the image access it like this
let img = UIImage(named:"folderName/imageName.jpeg")
OR
if let img = Bundle.main.path(forResource:"imageName",ofType:"jpeg",
inDirectory:"folderName") { }
Upvotes: 1