I have a UINavigationController
with default value of it's navigationBar.prefersLargeTitles = true
.
I am switching that to false
when I push
into a new scene lets call it (DetailsViewController
), by changing it into the viewWillDisappear
.
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.navigationBar.prefersLargeTitles = false
}
Now in DetailsViewController
I am using willMove(to parent:)
.
override func willMove(toParent parent: UIViewController?) {
navigationController?.navigationBar.prefersLargeTitles = true
}
To transition back to large titles .
Observe the attached snapshots of how iOS 13 doing it with how iOS 12 is doing it, considering iOS 12 is the correct behavior.
iOS 13 :
iOS 12 :