Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Large navigation title bar is hidden by default

Tags:

Large navigations bars were displayed by default but it suddenly changed to smaller title, probably in a recent update. I'm experience this issue with UICollectionViewController even though to confirm, I add the following code to the viewDidLoad method.

self.navigationController?.navigationBar.prefersLargeTitles = true
self.navigationItem.largeTitleDisplayMode = .always;

Any leads appreciated! :)

like image 713
Anushk Avatar asked Dec 20 '17 11:12

Anushk


1 Answers

I referred to iOS 11 large-title navigation bar not collapsing and although Apple has resolved the OPs issue, they introduced a new bug wherein if you set prefersLargeTitle and c via code, it results in large titles being displayed only when you manually scroll up.

Fix:

- Check largeTitleDisplayMode via storyboard

- Set largeTitleDisplayMode as "Automatic" via storyboard

- Remove any similar code from your View Controllers

like image 76
Anushk Avatar answered Sep 19 '22 13:09

Anushk