`.scrollEdgeAppearance` only works with `prefersLargeTitles` set to true?

I'm trying to use .scrollEdgeAppearance to effect a similar style to that used in the Reminders app for the 'new reminder' popover on iOS.

Here, we can see that when we're at the 'scroll edge' the navigation bar and shadow are transparent. And when the user scrolls they go back to the regular opaque/blur effect style.

They don't use large titles.

However, when trying to do something similar using .scrollEdgeAppearance I can't seem to replicate the effect. This is strange as it seems to be used quite liberally by Apple. e.g. in the aforementioned Reminders app, and also when a search controller has been added to a view controller's navigation item.

Do we really need to scrollViewDidScroll(_:) this?

Answered by Frameworks Engineer in 685859022

I'm not sure which UI you are referring to, but in iOS 15 the .scrollEdgeAppearance should always be selected when your scroll view is scrolled to the top. Prior to iOS 15 this also required you had some collapsing section (such as a large title or a non-pinned search bar).

Accepted Answer

I'm not sure which UI you are referring to, but in iOS 15 the .scrollEdgeAppearance should always be selected when your scroll view is scrolled to the top. Prior to iOS 15 this also required you had some collapsing section (such as a large title or a non-pinned search bar).

Right, so it's iOS 15 only – that would explain it. Very good to know.

I'm targeting iOS 14 so I'll have to figure some workaround for pre iOS 15.

Thanks for your help.

`.scrollEdgeAppearance` only works with `prefersLargeTitles` set to true?
 
 
Q