UINavigationBar Prompt No Longer Respects NSForegroundColor

Originator:futuretap
Number:rdar://44344865 Date Originated:11-Sep-2018 06:30 PM
Status:Duplicate/34714733/Open Resolved:
Product:iOS + SDK Product Version:11.0
Classification:Serious Bug Reproducible:Always
 
Summary:
This is a duplicate of radar #34758558

On iOS 10.3 and prior, setting the `titleTextAttributes` foreground color on UINavigationBar (either via UIAppearance, or on an instance) also style the prompt text. On iOS 11, this is no longer the case.

I consider this a regression, as it isn't immediately obvious that the workaround is to style `UILabel.appearanceWhenContainedIn...`. The old API dropped functionality, without any Xcode warning or documentation notes that I'm aware of.

I've attached a sample project. Look in MainViewController.swift:Line 16.


Steps to Reproduce:
1. Add a dark bar tint color to a UINavigationBar, to make this more visible.
2. Set titleTextAttributes on the bar to color the foreground white.
3. Add prompt text to the visible view controller's navigationItem, so that it's visible. Also add title text.
4. Run the app on iOS 10.x Observe that the prompt is colored the same as the title text.
5. Run again on iOS 11.

Expected Results:
The prompt text color should match the title text color.

Actual Results:
The prompt text remains black.

Version/Build:

iOS 11.0.0 (15A372)

Version:
11.0

Notes:

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!