0

Navigation bar back button sometimes has a white background on its liquid glass layer when I navigate to the screen.

enter image description here

I want it to be of clear background as shown below.

enter image description here

I am not setting any tint or background on left bar button item. Below is the code for navigation bar appearance.

let appearance = UINavigationBarAppearance()
    appearance.configureWithOpaqueBackground()
    appearance.backgroundColor = backgroundColor
    appearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: titleTextColor]
    appearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: titleTextColor]
    self.navigationController?.navigationBar.standardAppearance = appearance
    self.navigationController?.navigationBar.scrollEdgeAppearance = self.navigationController?.navigationBar.standardAppearance
    self.navigationController?.navigationBar.prefersLargeTitles = prefersLargeTitles
4
  • This is somehow expected to have a whitish layer as Apple is continuously improve the performance of glass effect, now it's much less transparent than what we saw in those developer beta versions. But you say "sometimes", can you please provide minimal reproducible example? Commented Oct 29 at 10:48
  • @kakaiikaka, it appears on scenarios where on previous view controller navigation bar was hidden and on destination view controller we show the navigation bar. Commented Oct 29 at 11:52
  • Okay, but you need to start by deleting all the code you have shown us, and maybe more code you have not shown us. You must not use UINavigationBarAppearance in iOS 26, you must not give a navigation bar a background color or make it opaque. Please watch the introductory WWDC videos about how to write for iOS 26. Commented Oct 29 at 14:08
  • Yes, I tried to reproduce your situation by a simple navigation, still not reproducible, so please consider following the community's guidelines, posting your minimal reproducible example so that we can help. Commented Oct 29 at 22:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.