UIAppearance Proxy does not work in tvOS 10 in places it used to work in tvOS 9

Originator:jordanbondo
Number:rdar://28740591 Date Originated:12-Oct-2016
Status:Duplicate - 27967180 (Open) Resolved:No Value
Product:tvOS SDK Product Version:10.0
Classification:Serious Bug Reproducible:Always
 
Summary:
Many UIAppearance calls do not work in tvOS 10

In tvOS 9, I was able to say:

`UITabBar.appearance().backgroundColor = UIColor.green`

and the tab bar background would be green. In tvOS 10, this does not work.

Steps to Reproduce:
See attached project, or do the following:

1. Create a new tvOS project using the Tab
2. In AppDelegate.swift, in application(application:didFinishLaunchingWithOptions), add the following:
    UITabBar.appearance().backgroundColor = UIColor.green
    UILabel.appearance(whenContainedInInstancesOf: [FirstViewController.self]).textColor = UIColor.red
3. Run the app in the tvOS 9.2 simulator
4. Notice the tab bar background is green and the labels are red
5. Run the app in the tvOS 10.0 simulator
6. Notice the labels are still changed to red, but the tab bar background is unchanged.

Because of these, much of my theming in my tvOS apps is broken. This is causing text to be invisible in UINavigationBar and UITabBar because both the text and background are getting set to black.

Expected Results:
I expect all calls to UIAppearance that worked in tvOS 9 to work in tvOS 10

Actual Results:
Some UIAppearance calls do not work.

Version:
tvOS 10.0

Configuration:
tvOS Simulator, Apple TV 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!