You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add iOS 26 liquid glass support to Apple Music alert views
Both AlertAppleMusic16View and AlertAppleMusic17View now auto-upgrade
their background to a tinted UIGlassEffect on iOS 26+, falling back to
the existing blur material on older versions. A new
init parameter lets callers opt out and keep the classic blur on iOS 26.
This is an outdated way of doing things. I advise you to use [SPM](#swift-package-manager). However, I will continue to support Cocoapods for some time.
[CocoaPods](https://cocoapods.org) is a dependency manager. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your `Podfile`:
77
-
78
-
```ruby
79
-
pod 'SPAlert'
80
-
```
81
-
82
-
</details>
83
-
84
69
### Manually
85
70
86
71
If you prefer not to use any of dependency managers, you can integrate manually. Put `Sources/AlertKit` folder in your Xcode project. Make sure to enable `Copy items if needed` and `Create groups`.
On iOS 26 and later, both `AlertAppleMusic16View` and `AlertAppleMusic17View` automatically upgrade their background to a tinted `UIGlassEffect`. On older iOS versions they fall back to the original blur material, so no caller changes are required.
100
+
101
+
If you want to opt out and force the classic blur on iOS 26+, pass `forceNonGlass: true` at construction time:
102
+
103
+
```swift
104
+
let alertView =AlertAppleMusic17View(title: "Added to Library", subtitle: nil, icon: .done, forceNonGlass: true)
105
+
106
+
// also available on the iOS 16 style
107
+
let alertView16 =AlertAppleMusic16View(title: "Added to Library", subtitle: nil, icon: .done, forceNonGlass: true)
108
+
```
109
+
110
+
The flag must be set at init — the background effect is built during initialisation, so a property change afterwards would have no effect.
111
+
112
112
## Present & Dismiss
113
113
114
114
You can present and dismiss alerts manually via view.
@@ -128,18 +128,6 @@ For dismiss all alerts that was presented:
0 commit comments