Reputation: 13803
I want to make my large title navigation bar to be back to the default nav bar like the image above, the image above is when I run the app on iOS 12, there is a separator line and the color is little bit grey.
but when I run the app in iOS 13 is like the image below, the navigation bar is completely white and it seems there is no dark grey separator
I want to make my nav bar in iOS 13 is exactly the same as iOS 12, which is little grey and it has separator line
and here is the code I run in viewWillAppear :
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .always
}
I am using storyboard, and here is the setting I use. even from storyboard, as you can see, it seems the nav bar is already completely white and no separator
Upvotes: 0
Views: 1099
Reputation: 535138
The behavior you are seeing is normal and correct in iOS 13. In iOS 13, a navigation bar with a large title is, by default, transparent. That means the white of the main view behind it shows through and it has no shadow (what you call the "separator"). You surely must have noticed this by now on your phone; iOS 13 has been around for almost a year! Apple's own apps generally look this way.
If that isn't what you want, configure the navigation bar's scrollEdgeAppearance
to be what you do want.
Upvotes: 1