Partially disable liquid glass effect from navigation bars but retain on tabbar

I want to be able to disable all liquid glass effects from my Navigation bar, and it's bar buttons. But I still want to be able to have the liquid glass effect on my UITabbar.

Is there a way to disable glass effects from navbar and still retain them all for tabbars using UIKit?

For toolbar and navigation bar buttons (UIBarButtonItem), you can set the hidesSharedBackground property to true.

I'm still looking for a way to remove the Liquid Glass style from the Back button. I tried this in my view controller but it had no effect:

self.navigationItem.backBarButtonItem?.hidesSharedBackground = true

I ended up completely replacing the back button:

override func viewDidLoad() {
	super.viewDidLoad()
	
	let imageConfig = UIImage.SymbolConfiguration(pointSize: 24, weight: .unspecified, scale: .default)
	let image = UIImage(systemName: "chevron.left", withConfiguration: imageConfig)
	let backButton = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(clickBackButton))
	backButton.hidesSharedBackground = true
	backButton.tintColor = .blue
	self.navigationItem.leftBarButtonItem = backButton
}

@objc func clickBackButton() {
	self.navigationController?.popViewController(animated: true)
}

The only downside I see so far is that the long-press on the back button to show a menu of the navigation stack is no longer available.

Partially disable liquid glass effect from navigation bars but retain on tabbar
 
 
Q