I am using the 1Password Pod and the GCast pod and they both have xcassets files with the assets they want you to use. When I create a button in IB and assign it the name of one of the images in the xcassets file, the correct image shows up but on run-time i get a debug error of: Could not load the "onepassword-button" image referenced from a nib in the bundle with identifier "com.myApp.App"
Any idea what i need to do? Thanks
The only way to resolve this that I've found is to specify the image programmatically, not in Interface Builder:
let bundle = NSBundle(forClass: OnePasswordExtension.self)
let image = UIImage(named: "OnePasswordExtensionResources.bundle/onepassword-button", inBundle: bundle,
compatibleWithTraitCollection: nil)
Note that you still need to specify the full path to the resource bundle in UIImage
initializer, as the bundle
value is not the resource bundle itself, but the container framework bundle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With