I'm trying to load an image from an iOS 8 framework that I'm writing (in Swift). I'm using Xcode 6 Beta 6
This code does not work (i.e. load image) if the image is stored in my framework's Images.xcassets
:
let image = UIImage(named: "Background.png")
If the image is stored in an Images.xcassets
of a host application (that uses the framework), then the image is loaded properly (from code inside the framework).
I can see that the framework's Images.xcassets
is included in the Copy Bundle Resources
phase.
I'm also using a storyboard file as a resource in the framework; and this loads properly.
I've tried renaming the Images.xcassets of the framework to avoid some kind of naming collision with the host application, but this doesn't work either.