UIBarButtonItem setTitleTextAttributes needs to be set for all states on iOS 11

Originator:David.Jongepier
Number:rdar://34276265 Date Originated:6 Sep 2017
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11 beta 9 (15A5370a)
Classification:Bug Reproducible:Always
 
Area:
UIKit

Summary:
When calling UIBarButtonItem.appearance().setTitleTextAttributes(..., for: .normal) on iOS 11, the font is only changed for normal state. On iOS 10, it is changed for all states.

I believe this is a bug, because in other instances (e.g. UITabBarItem.appearance().setTitleTextAttributes(...)), any appearance set to .normal state applies to other states as well.

Steps to Reproduce:
- Launch the included project.
- Long press on the top right UIBarButtonItem.
- Observe how the font changes to system default on iOS 11, but stays customized on iOS 10.

Expected Results:
The font should stay customized like on iOS 10.

Actual Results:
The font reverts to system default.

Version/Build:
iOS 11 beta 9 (15A5370a)

Comments

I am also facing the same issue

Am also facing the same issue.

By ismailahamedsyed at Oct. 2, 2017, 7:02 a.m. (reply...)

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!