Using a named background color in Xcode breaks the ability to override the colour in viewDidLoad

Number:rdar://51208444 Date Originated:2018-05-29
Status:Open Resolved:
Product:Xcode Product Version:10.2.1
Classification:Bug Reproducible:Always

When setting a background color of the view of a ViewController in a Storyboard using a named color from a xcasset color set, it's no longer possible to override the colour in viewDidLoad / viewWillAppear

Steps to Reproduce:
1. Create a color set in the xcassets file
2. Use the named color as the background color for a view in a storyboard
3. Attempt to override the color with another color in viewDidLoad

Expected Results:
Color should be overwritten

Actual Results:
Call to `view.backgroundColor =` is ignored. 

Xcode Version 10.2.1 (10E1001)
Swift 5.0



As a workaround, use viewDidLayoutSubviews to override the colour.

By claus.junker.joergensen at May 29, 2019, 5:07 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!