2017-11-21 1 views
0

テキストを共有するときに、バーのボタン項目を変更したいと思います。テレグラムを共有しているときにtintColorバーのボタン項目を変更するにはどうすればいいですか?

私のコードは以下の通りです: enter image description here

は、私はちょうどボタン "キャンセル" に変更:起こった何

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を変更するにはどうすればよいですか?

答えて

0

これはトリックを行う必要があります

self.navigationItem.rightBarButtonItem.tintColor = .red 
関連する問題