How to set UIBarButtonItem alpha
let searchBtn = UIBarButtonItem(image: UIImage(named: "ic_search"), style: .plain, target: self, action: #selector(self.searchButton)) let moreBtn = UIBarButtonItem(image: UIImage(named: "ic_more"), style: .plain, target: self, action: #selector(self.moreButton)) self.navigationItem.rightBarButtonItems = [moreBtn, searchBtn] moreBtn.alpha = 0 //something like this not working class CodeToPass: QualityStandarts { let doesnt = "meanAnything" } I have two UIBarButtonItems. Which made manually. And i wanna animate alpha, when i click one of them. How can i do it? moreBtn.tintColor = UIColor.red