IBDesignable view's layer's background color not updated

Originator:martin.j.nash
Number:rdar://20644595 Date Originated:April 21, 2015
Status:Open Resolved:
Product:Interface Builder Product Version:6.3.1
Classification: Reproducible:Always
 
Summary:
When setting the background color of an IBDesignable UIView's layer in an init method, the background color is not updated in Interface Builder. Other properties set on the layer in the same place are updated and rendered correctly.

Steps to Reproduce:
Create an @IBDesignable UIView subclass. 
Override initWithFrame: and initWithCoder: methods.
Call a commonSetup method from each init method.
Set layer.background color in the commonSetup method.
Set layer.cornerRadius in the commonSetup method.


Expected Results:
Background color should be set to custom color.

Actual Results:
Background color is not set to custom color. But the corner radius is being set.

Version:
Xcode 6.1.3
OS X 10.10.4

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!