I have a bundle with assets folder in it. I have read all the answers on stack about using UIImage(named: "drop_arrow", inBundle: bundle, compatibleWithTraitCollection: nil)
(well, it's swift 3 equivalent)
path = Bundle.main.path(forResource: "LiveUI", ofType: "bundle")
if path != nil { // path with bundle is found
let bundle: Bundle = Bundle.init(path: path!)! // bundle is there
let image: UIImage? = UIImage(named: "HomePlayButton", in: bundle, compatibleWith: nil)
// HomePlayButton exists in the bundle/asset folder
// but image is nil
}
This is my project structure:
Can you see any problem with the code/structure of the project?
UPDATE! ... The image is set for all resolutions as universal: