Add Ability to Reference XIBs from Storyboards

Originator:sethfri
Number:rdar://32020366 Date Originated:05-May-2017 11:28 AM
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification:Feature (New) Reproducible:Not Applicable
 
Summary:
As a developer, I want to be able to develop a reusable custom view using the power of IB in a XIB file, and use it in multiple places in a storyboard.

Currently, if I want to develop a custom view and use it in a storyboard, I only have 2 options:

1. Create the custom layout in one scene in my storyboard, and copy-paste it into other scenes in my storyboard. This is very error prone, and Auto Layout constraints don't often copy-paste correctly. It's also not scalable when I want to use a custom view in dozens of places in a large app like the Amazon App.
2. Create the custom view entirely in code, and then use IBDesignable for it to show up in my storyboard. This is feasible, but not ideal because I need to maintain more code and don't get the power of IB.

Ideally, I want a third option: To be able to design my custom view entirely in a XIB file, so I can still use IB, but then be able to easily say in my storyboard "use this XIB to layout this view class"

Steps to Reproduce:
N/A

Expected Results:
I can reference a XIB within my storyboard file.

Actual Results:
I can't reference a XIB from my storyboard file. I need to build custom views with code or manually copy-paste them around my storyboard.

Regression:
N/A

Notes:
N/A

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!