In the new iOS 26 design, the navigation bar and tab bar will have a dark gradient background. We found that the color of this gradient depends on the background color of the page. For example, in the following page, our background color is green, so the navigation bar and tab bar will change the gradient to green.
Is there any way to change this gradient color?
I tried .toolbarBackground(.hidden, for: .navigationBar), but does not work。
I tried .toolbarBackground(LinearGradient(colors: [.black.opacity(0.4), .black.opacity(0)], startPoint: .top, endPoint: .bottom), for: .navigationBar), but it looks like the default gradient is the superposition of the gradient I defined, not a replacement.