In there a way to apply the glass effect to an Image with for example ForegroundStyle?
Asked on 2025-09-12
1 search
To apply a glass effect to an image using something like ForegroundStyle
, you can use the NSGlassEffectView
in AppKit or the UIVisualEffectView
in UIKit. These APIs allow you to apply a glass effect to your content, including images, by setting the content view of the glass effect view to your desired view.
For AppKit, you can use the NSGlassEffectView
as follows:
- Create an
NSGlassEffectView
for each element you want to display with a glass effect. - Set the
contentView
property of theNSGlassEffectView
to your image view. - Add the
NSGlassEffectView
to your view hierarchy.
For UIKit, you can use the UIVisualEffectView
:
- Create a
UIVisualEffectView
and configure it with a glass effect. - Set the
contentView
of theUIVisualEffectView
to your image view. - Add the
UIVisualEffectView
to your view hierarchy.
These methods allow you to apply a glass effect to images and other content, providing a visually appealing and interactive layer in your app's UI. For more detailed guidance, you can refer to the session Build an AppKit app with the new design and Build a UIKit app with the new design.

Design widgets for visionOS
Learn how you can design beautiful widgets for visionOS 26 that blend effortlessly into someone’s surroundings. Discover how you can add depth to your widget design and customize materials, sizes, and styles for spatial computing. We’ll share how to adapt your existing widgets for visionOS, or design new widgets that feel like real objects.

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.

What’s new for the spatial web
Discover the latest spatial features for the web on visionOS 26. We’ll cover how to display inline 3D models with the brand new HTML model element. And we’ll share powerful features, including model lighting, interactions, and animations. Learn how to embed newly supported immersive media on your web site, such as 360-degree video and Apple Immersive Video. And get a sneak peek at adding a custom environment to your web pages.