Reputation: 1472
Making UI of my app using code only. Can't find how customize couple elements: 1. Button 'Back' now it looks like:
and it should looks like:
So, how I can get rid of 'Back' text from button title, keeping '<' system icon there? And how I can change colors of back button and title of navigation bar?
Upvotes: 2
Views: 6527
Reputation: 556
With XCode 12.3 can change the Title Color and Back Button using the following.
Upvotes: 0
Reputation: 369
Follow the instruction from your xcode. You can do this easily. I also marked on the image . Select 1. Select the Standard Editor, 2. Show the File inspector 3 Set global Ting
Upvotes: 0
Reputation: 1598
try
self.navigationController?.navigationBar.tintColor = UIColor.white
Upvotes: 9
Reputation: 28
Try:
override func viewDidLoad(){
//any other initial stuffs
//for the bar
navigationController?.navigationBar.tintColor = UIColor.black
//for the button
navigationController?.navigationBar.backItem?.titleView?.tintColor = UIColor.white
}
Upvotes: 0