Skip to content

[Liquid glass]: Modals#113

Merged
mikhailChelbaev merged 5 commits into
devfrom
liquid-glass/modals
Jun 5, 2026
Merged

[Liquid glass]: Modals#113
mikhailChelbaev merged 5 commits into
devfrom
liquid-glass/modals

Conversation

@mikhailChelbaev

@mikhailChelbaev mikhailChelbaev commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator
  • Add shared BackgroundStyle support for modal backgrounds
  • Support solid, blur, and iOS 26 liquid glass backgrounds in SwiftUI modals
  • Support blur and liquid glass backgrounds in UIKit modal controllers
  • Forward alert background style through AlertVM into the center modal implementation
  • Add demo preview controls for modal and alert background styles

@mikhailChelbaev

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0d83dfff0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
static func contentView(_ view: UIView, model: VM) {
view.backgroundColor = model.preferredBackgroundColor.uiColor
view.backgroundColor = model.preferredBackgroundColor?.uiColor

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep effect backgrounds transparent when tinted

When backgroundStyle is .blur or .liquidGlass and callers also set backgroundColor, this line paints the whole contentView behind the UIVisualEffectView with that color. Because the effect view is then blurring/glassing a same-sized solid parent background instead of the presenting content, the UIKit modal no longer shows the content behind it; SwiftUI instead applies the color as a tint overlay. The filled background should be limited to .solid (or otherwise moved into the effect/tint layer) so tinted blur/glass stays translucent.

Useful? React with 👍 / 👎.

@mikhailChelbaev mikhailChelbaev merged commit 83a36e0 into dev Jun 5, 2026
1 check passed
@mikhailChelbaev mikhailChelbaev deleted the liquid-glass/modals branch June 5, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant