I have the following code and the color of the menu button is white but I want to change its color and what I have tried has not worked yet.
I'd appreciate your help.
func addSlideMenuButton(){
//let image = UIImage(named: "menu-button2.png")
let btnShowMenu = UIButton()
btnShowMenu.setImage(self.defaultMenuImage(), for: UIControlState())
btnShowMenu.frame = CGRect(x: 0, y: 0, width: 30, height: 30)
btnShowMenu.addTarget(self, action: #selector(BaseViewController.onSlideMenuButtonPressed(_:)), for: UIControlEvents.touchUpInside)
btnShowMenu.setTitleColor(UIColor.blue, for: UIControlState())
btnShowMenu.tintColor = UIColor.blue
//btnShowMenu.setBackgroundImage(image, for: UIControlState())
let customBarItem = UIBarButtonItem(customView: btnShowMenu)
self.navigationItem.leftBarButtonItem = customBarItem
let back = UIBarButtonItem(title: "⏎", style: .plain, target: self, action: #selector(BaseViewController.backNavigationSim(_ :)))
self.navigationItem.rightBarButtonItem = back
}
in the AppDelegate inside the didFinishLaunchingWithOptions function if you have a UInavigationBar put: