When UIAppearance is implemented, Interface Builder configuration isn't respected

Originator:joshavant
Number:rdar://24470115 Date Originated:02-Feb-2016 04:07 PM
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 9.2
Classification:UI/Usability Reproducible:Always
 
Summary:
When UIAppearance is implemented, Interface Builder configuration isn't respected.

This may well be a documentation issue, considering UIAppearance is a proxy and is implemented in a runtime fashion, whereas Interface Builder is implemented in a compile-time fashion.

However, I'd argue that a change needs to occur, to move towards one of two outcomes:
-Interface Builder's internals are modified, such their generated config is respected when UIAppearance configuration is implemented
-This behavior is more clearly documented around official documentation and, perhaps, even the Xcode interface

Steps to Reproduce:
1. In application:didFinishLaunchingWithOptions: implement the following set of directives:

UIButton.appearance().setTitleColor(UIColor.blueColor(), forState: .Normal)
UIButton.appearance().setTitleColor(UIColor.blueColor(), forState: .Highlighted)
UIButton.appearance().setTitleColor(UIColor.blueColor(), forState: .Selected)
UIButton.appearance().setTitleColor(UIColor.blueColor(), forState: .Disabled)

2. In Interface Builder, configure the root view controller to display a UIButton in its view

3. Set that UIButton's titleColor for every state to Red Color, in Interface Builder

Expected Results:
The UIButton's title color is red

Actual Results:
The UIButton's title color is blue

Version:
iOS 9.2

Notes:


Configuration:
iOS Simulator

Attachments:

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!