UILabel + UIStackView + IBDesignable + UITableViewCell == bad display

Originator:hotngui
Number:rdar://29950447 Date Originated:1/10/2017
Status:Open Resolved:
Product:Xcode Product Version:8.2.1
Classification:Serious Bug Reproducible:Yes
 
In IB (works at runtime) if I set the font of a UILabel subclass in the prepareForInterfaceBuilder() method the frame of said label gets set to zero. 

It only happens when the UIStackView is in a UITableViewCell or UICollectionViewCell. It works fine in a simple UIViewController/UIView.

Steps to Reproduce:
Open the project in Xcode.

Expected Results:
The labels should be of the correct size and location

Actual Results:
The frames of the labels are set to a size of zero.

Version:
MacOS 10.2.2 (16C67)
Xcode 8.2.1 (8C1002)

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!