Hide large title when scrolling up

Viewed 11737

I have a normal view controller that is embedded in a navigation controller. In this view controller, I have a table view that is using the constraints of the safe area. (I don't use a table view controller)

The navigation controller is set to prefer large titles and the mode is set to .always. In beta 2 this worked perfectly, So when I came in the title was large and when I scrolled down it became small (Like the normal one). But since beta 3 this doesn't work anymore.

Anyone know how to turn this back on, or how to make it so when I scroll the table view it will become smaller. Like the behaviour of all the new iOS 11 apps?

Or is this a bug in the current version of swift 4/iOS 11 but the apps like messenger and settings still work this way.

Thanks in advance.

5 Answers

I'm using a programmatic layout and ran into a similar issue with large titles. I found the solution here: https://stackoverflow.com/a/46692583/131378. In viewDidLoad() I had to toggle the largeTitleDisplayMode off and on again. That was the correct combination that got the large titles working with scrolling:

self.navigationItem.largeTitleDisplayMode = .never
self.navigationItem.largeTitleDisplayMode = .always
Related