【发布时间】:2020-01-17 15:41:07
【问题描述】:
想要在导航栏后退按钮项上使用我自己的自定义字体,这在过去对我有用:
let barButtonAttributes = [NSAttributedString.Key.foregroundColor : UIColor.pink,
NSAttributedString.Key.font : UIFont(name: "My-Awesome-Font", size: 18)!]
UIBarButtonItem.appearance().setTitleTextAttributes(barButtonAttributes, for: .normal)
UIBarButtonItem.appearance().setTitleTextAttributes(barButtonAttributes, for: .highlighted)
在 iOS 13 中,这对我不起作用。有解决办法吗?
【问题讨论】:
-
这能解决问题吗:stackoverflow.com/a/57958270/6459929 ?
-
很遗憾没有:(
标签: ios swift uinavigationcontroller uinavigationbar uibarbuttonitem