diff --git a/Sources/AlertToast/AlertToast.swift b/Sources/AlertToast/AlertToast.swift index 17bf751..cf5271f 100644 --- a/Sources/AlertToast/AlertToast.swift +++ b/Sources/AlertToast/AlertToast.swift @@ -631,12 +631,22 @@ fileprivate struct BackgroundModifier: ViewModifier{ @ViewBuilder func body(content: Content) -> some View { - if let color = color { - content - .background(color) + if #available(iOS 26, macOS 26, *) { + if let color = color { + content + .background(color) + .glassEffect(in: .rect(cornerRadius: 16)) + }else{ + content.glassEffect(in: .rect(cornerRadius: 16)) + } }else{ - content - .background(BlurView()) + if let color = color { + content + .background(color) + }else{ + content + .background(BlurView()) + } } } }