File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,18 @@ import UIKit
4545 return
4646 }
4747
48+ // Runtime check to ensure UIGlassEffect is available
49+ // This handles cases where early iOS 26 beta releases may not have this API
50+ guard let glassEffectClass = NSClassFromString ( " UIGlassEffect " ) as? NSObject . Type else {
51+ return
52+ }
53+
54+ // Verify that the effectWithStyle: selector is available
55+ // This provides an additional safety check for early beta versions
56+ guard glassEffectClass. responds ( to: Selector ( ( " effectWithStyle: " ) ) ) else {
57+ return
58+ }
59+
4860 guard let preferredStyle = style. converted else {
4961 UIView . animate {
5062 // TODO: Looks like only assigning nil is not working, check this after stable iOS 26 is rolled out.
@@ -71,4 +83,3 @@ import UIKit
7183@objc public class LiquidGlassViewImpl : UIView { }
7284
7385#endif
74-
You can’t perform that action at this time.
0 commit comments