Why is the large title navigation bar not resizing to be big after scrolling back up ?

I have a view controller, embeded in a navigation controller which has large title navigation bar enabled with this code :


self.navigationController?.navigationBar.prefersLargeTitles = true

self.navigationItem.largeTitleDisplayMode = .always


The view controller has a scroll view and when I scroll down the bar gets small as expected , but when I scroll back up it doesn't get big again .

What should I do ?

  • I have the same problem still in iOS 15. Large title doesn't come back after scrolling back up. Would love to know why this happens in some cases.

Add a Comment

Replies

I've noticed some weird layout glitches related to big nav bars. Are there any sibling views of the scroll view in the view controller? I ran into an issue where a hidden sibling view caused some issues related to the nav bar layout. Instead of hiding the sibling view, I remove it from the view hierarchy when not needed instead and that seemed to fix some of the layout problems for me.


Still notice another glitch where the big title label clips after a refresh control finishes updating. But that's another story. My workaround for that is to reset the refresh control property on the scroll view after updating and that forces the big nav bar title to layout proper.