Button in UINavigationBar remains in "pressed" state when opening new view controller

Number:rdar://37230379 Date Originated:2018-02-05
Status:Closed Resolved:Fixed
Product:iOS Product Version:11.2
Classification:Bug Reproducible:Always
Summary: The UIBarButtonItem item inside the UINavigtionBar remains in the "pressed" state after opening a new view controller via a segue or programmatically. This is a known issue for only 11.2+ and has been discussed in public forums already: https://stackoverflow.com/questions/47754472/ios-uinavigationbar-button-remains-faded-after-segue-back

Steps to Reproduce:
1. Create an instance of a UINavigationController and present it
2. Add a UIBarButtonItem to the UINavigationBar of it and add a touchUpInside handler to it that triggers a new view controller to be pushed to the navigation controller (can be done multiple ways, doing it that way for simplicity)
3. Tap the button: A new view controller will be pushed
4. Close / Dismiss the view controller again

Expected Results: The UIBarButtonItem of the UINavigationController goes back to it's default state, not being selected or "pressed".

Actual Results: The UIBarButtonItem of the UINavigationController remains in the selected or "pressed" state, causing a UI-glitch.

Version/Build: 11.2+ only

Configuration: Xcode 9.2 (9C40b)


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!