File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -132,8 +132,7 @@ open class VisualEffectView: UIVisualEffectView {
132132
133133 case . glass( let glass) :
134134 if #available( iOS 26 . 0 , * ) {
135- // Switching from blur/custom -> glass is fine.
136- self . effect = makeGlassEffect ( from: glass)
135+ self . effect = UIGlassEffect ( style: glass. uiStyle) // UIKit iOS 26 API
137136 } else {
138137 // graceful fallback on older OS
139138 apply ( style: . blur( . system( . systemThinMaterial) ) )
@@ -192,11 +191,6 @@ private extension VisualEffectView {
192191 }
193192 }
194193
195- @available ( iOS 26 . 0 , * )
196- func makeGlassEffect( from style: GlassStyle ) -> UIVisualEffect {
197- return UIGlassEffect ( style: style. value)
198- }
199-
200194 /// iOS 26: Some builds have a bug where setting `effect = nil` after a `UIGlassEffect`
201195 /// does not remove the effect; setting an intermediate effect first works around it.
202196 func clearEffectWorkaroundIfNeeded( ) {
You can’t perform that action at this time.
0 commit comments