Cannot specify bundle for image in Interface Builder

Originator:tobias.kress
Number:rdar://45984602 Date Originated:12-Nov-2018 11:17 AM
Status:Duplicate/7057746 Resolved:
Product:Developer Tools Product Version:Version 9.4 (9F1027a)
Classification:Other Bug Reproducible:Always
 
Summary:
This is a duplicate of radar #41178010

You're unable to specify a custom bundle/module for an image in IB. In code you can load an image from a bundle with `UIImage(named:in:compatibleWith:)`, but this functionality is not exposed in IB.


Steps to Reproduce:
1. Create a storyboard or xib file with an Image View
2. Specify an image from an asset catalog in bundle of another module (it will even be suggested if the module is in the same project)
3. Run the app and notice the image does not show at run time

Expected Results:
You should be able to specify a custom bundle in IB so that the image is loaded at run time, much like you can specify a module when setting a class in IB (see attachment).

Actual Results:
The image is not loaded since the correct bundle isn't specified, so it defaults to the bundle of the storyboard/xib file and fails to load it.

Version/Build:
Version 9.4 (9F1027a)

Version:
Version 9.4 (9F1027a)

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!