[英]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.