答案 0 :(得分:1)
为将来参考,当您仅为normal
控件状态设置外观属性时,会发生重影:
UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.font : UIFont.barButtonBody()], for: UIControl.State.normal)
为防止重影,您还需要将其设置为highlighted
状态:
UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.font : UIFont.barButtonBody()], for: UIControl.State.highlighted)