This is a bug in iOS 11.2 and happens because the UIBarButtonItem
stays highlighted after navigation and does not return to its normal state after the other view controller pops.
To avoid this behavior, either
-
use a
UIBarButtonItem
with aUIButton
as a custom view -
disable and re-enable the bar button item in
viewWillDisappear(_:)
(although this causes the button to appear immediately, use matt’s solution to avoid this):barButtonItem.isEnabled = false barButtonItem.isEnabled = true