Is there way to disable the glass effect on a specific leftBarButtonItem UIBarButtonItem which has no action attached to it. It is just a non interactive image.
Asked on 2025-09-09
1 search
To disable the glass effect on a specific UIBarButtonItem
that is a non-interactive image, you can follow the guidance provided in the WWDC sessions. While there isn't a direct mention of disabling the glass effect for a UIBarButtonItem
, you can consider using a custom view for your bar button item. This approach allows you to have more control over the appearance and behavior of the item.
Here's a general approach based on the information from the sessions:
-
Create a Custom View: Instead of using a standard
UIBarButtonItem
, create a custom view (e.g., aUIImageView
) that displays your non-interactive image. -
Add the Custom View to the Navigation Bar: Use the custom view as the
customView
property of aUIBarButtonItem
. This way, you can avoid the default glass effect applied to standard bar button items. -
Ensure No Interaction: Since the image is non-interactive, ensure that user interaction is disabled on the custom view by setting
isUserInteractionEnabled
tofalse
.
This approach allows you to bypass the default styling and behavior of UIBarButtonItem
and gives you full control over the appearance of your image.
For more detailed information on customizing navigation bars and toolbars, you can refer to the session Build a UIKit app with the new design (07:19).

Build a UIKit app with the new design
Update your UIKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.

Build an AppKit app with the new design
Update your AppKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.

Build a SwiftUI app with the new design
Explore the ways Liquid Glass transforms the look and feel of your app. Discover how this stunning new material enhances toolbars, controls, and app structures across platforms, providing delightful interactions and seamlessly integrating your app with the system. Learn how to adopt new APIs that can help you make the most of Liquid Glass.