I have an extension to configure my UINavigationController
with large titles which I call in ViewDidLoad
of my controller;
extension UINavigationController {
func configure(with title: String) {
navigationController?.navigationBar.prefersLargeTitles = true
navigationItem.title = title
navigationItem.largeTitleDisplayMode = .automatic
}
}
This extension doesn't seem to be called, however, when I place:
navigationController?.navigationBar.prefersLargeTitles = true
Into my ViewDidLoad
, it works as expected. any ideas on why this would be?