UIBarButtonItem loses UIAppearance font when UIAlertController is displayed

Originator:chilvman
Number:rdar://27888664 Date Originated:17-Aug-2016
Status:Open Resolved:
Product:iOS Product Version:9.3
Classification:Defect Reproducible:Always
 
Summary:
If a UIBarButtonItem has a font set via UIAppearance protocol setTitleTextAttributes, and the button is on screen when a UIAlertController is presented, then the bar button item might lose it’s font.

Steps to Reproduce:
1: Set a font on UIBarButtonItem.appearance.setTitleTextAttributes( , forState: .Normal)
2: Add a bar button item with text to a view controller
3: Present a UIAlertController from that view controller while it is on screen

Expected Results:
The fonts of the bar button does not change

Actual Results:
When the alert appearance animation completes, or sometimes on dismissal, the font of the button changes

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!