How do I migrate my UI without SwiftUI to liquid glass?

Asked on 2025-06-16

2 searches

To migrate your UI to use Liquid Glass without SwiftUI, you can follow the guidance provided for both AppKit and UIKit, as these frameworks support the new design system.

For AppKit:

  1. Use NSGlassEffectView: Create an NSGlassEffectView for each element you want to display with the Liquid Glass effect. Set the contentView property to your desired view. This ties the geometry to the content view using auto layout, ensuring they stay in sync.
  2. Integrate into View Hierarchy: Place the glass effect views into your view hierarchy. You can update existing stack views to include these new glass effect views.
  3. Group Glass Elements: If you have multiple glass shapes in close proximity, group them using NSGlassEffectContainerView to maintain a cohesive appearance.

For more detailed guidance, you can refer to the session Build an AppKit app with the new design (17:30).

For UIKit:

  1. Use UIVisualEffectView: Create a UIVisualEffectView and configure it with the Liquid Glass effect. Add your glass views as subviews to your container's content view.
  2. Control Interaction: Use the UIGlassContainerEffect to manage how glass views interact, such as merging when they come close together.
  3. Adopt System Views: Where possible, use system views and controls to ensure the best experience with Liquid Glass.

For more detailed guidance, you can refer to the session Build a UIKit app with the new design (17:24).

By following these steps, you can effectively migrate your UI to incorporate Liquid Glass, enhancing the visual depth and expressiveness of your app.