I've been searching different solutions and the one that I keep seeing repeatedly is to set the scroll edge appearance equal to the standard appearance. I have also looked at this solution. Neither solution is working for me. I am also not seeing that this issue appears once the user gets to the end of the scrollable content, which is what I believe scroll edge is. I am seeing the problem happen as soon as the user starts scrolling in a long list. I've included photos below, with confidential data blurred out. The only place in my app where the navigation bar looks correct is in the master view. My app architecture is master detail. It worked perfect in all navigation bars in iOS 14, this issue is specific to iOS 15.
Scenario 1: Master View Controller List View (nav bar looks correct once scrolling starts)
Scenario 2: After selecting an item on the MVC table (nav bar is transparent and not blurred once scrolling starts)
Here is my current view in storyboard with the default values for standard and scroll edge.
Some things I have tried besides setting scroll edge appearance equal to standard:
In iOS 15, UIKit has extended the usage of the scrollEdgeAppearance, which by default produces a transparent background, to all navigation bars. Set scrollEdgeAppearance as below code. It is working for me.
if #available(iOS 15, *) {
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = < your tint color >
navigationController?.navigationBar.standardAppearance = appearance;
navigationController?.navigationBar.scrollEdgeAppearance = navigationController?.navigationBar.standardAppearance
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With