self.title = "Title"
navigationController?.navigationBar.prefersLargeTitles = true
self.navigationController?.navigationBar.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor : UIColor.white]
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Add", style: .plain, target: self, action: #selector(addTapped))
navigationItem.rightBarButtonItem?.tintColor = .white
Is it possible to make this Add
looks exactly like this Title
?
Something like this:
Or any other solution for this - title left - button with image right, same heights?
please go through this answer which shows how you can manage Navigation bar title when collapsed and when it's large. It won't give you an exact answer but it will definitely help you in achieving what you want.
Other then that please go through this answer which will help you understand how give x,y positions to right bar button item.
Just a quick overview how you can achieve what you want by the combination of this two answers:-
and Done. By using this you can manage the position of your bar button item at both the item when your Navigation bar is Enlarged at that time you can show button at different position and when the Navigation Bar is collapsed you can show button at different position so that it doesn't look vice-versa of your question after changing position of your button.