Interface Builder: IB_DESIGNABLE Views In Static Libraries Don't Display in IB

Originator:wetzeal
Number:rdar://19820878 Date Originated:12-Feb-2015 06:43 PM
Status:Duplicate/18991695/Open Resolved:
Product:Developer Tools Product Version:Xcode-Beta (6D520o)
Classification:UI/Usability Reproducible:Always
 
Summary:
Views with IB_DESIGNABLE that are included in a static library in an Xcode project don’t display their custom content in interface builder. This issue has been present in all versions of Xcode 6, including 6.3 Beta 1.

Steps to Reproduce:
1) Add a UIView subclass to a static library included in an iOS project
2) Mark the UIView subclass IB_DESIGNABLE
3) Add an instance of that view to a nib/storyboard
4) Notice the view does not draw 

Expected Results:
The view should draw correctly

Actual Results:
The view appears as an empty UIView

Notes:
Subclassing the view with no implementation in the main project and marking as IB_DESIGNABLE is sufficient to get the view to draw. The attached project includes two views in Main.storyboard: they both draw a 50x50 blue square in drawRect:. One is implemented in a static library, the other is an empty subclass in the main project. Only the empty subclass draws in interface builder, but both draw when the application is run.

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!