[英]How to change tintColor bar button item when I share on Telegram?
共享文本时,我想更改条形按钮项目。
我的代码如下:
let color = UIColor.red
let newFont = UIFont(name: "Avenir Next", size: 16.0)!
UIBarButtonItem.appearance(whenContainedInInstancesOf: [UINavigationBar.classForCoder() as! UIAppearanceContainer.Type]).setTitleTextAttributes([NSForegroundColorAttributeName: color, NSFontAttributeName: newFont], for: .normal)
我刚刚更改了按钮“取消”。 如何更改“发送”栏按钮的tintColor?
这应该可以解决问题
self.navigationItem.rightBarButtonItem.tintColor = .red
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.