@@ -60,9 +60,16 @@ - (void)setup {
60
60
UIView *containerView = self;
61
61
#ifdef __IPHONE_26_0
62
62
if (@available (iOS 26.0 , *)) {
63
+ UIVisualEffect *effect = nil ;
64
+ #if !TARGET_OS_VISION
63
65
UIGlassEffect *glassEffect = [UIGlassEffect effectWithStyle: UIGlassEffectStyleClear];
64
66
glassEffect.interactive = YES ;
65
- _glassView = [[UIVisualEffectView alloc ] initWithEffect: glassEffect];
67
+ effect = glassEffect;
68
+ #else
69
+ UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle: UIBlurEffectStyleProminent];
70
+ effect = blurEffect;
71
+ #endif
72
+ _glassView = [[UIVisualEffectView alloc ] initWithEffect: effect];
66
73
_glassView.cornerConfiguration = [UICornerConfiguration capsuleConfiguration ];
67
74
_glassView.userInteractionEnabled = YES ;
68
75
[self addSubview: _glassView];
@@ -108,10 +115,14 @@ - (void)setup {
108
115
[_doneIconButton setImage: [TOCropToolbar doneImage ] forState: UIControlStateNormal];
109
116
[_doneIconButton setTintColor: [UIColor colorWithRed: 1 .0f green: 0 .8f blue: 0 .0f alpha: 1 .0f ]];
110
117
[_doneIconButton addTarget: self action: @selector (buttonTapped: ) forControlEvents: UIControlEventTouchUpInside];
111
- #ifdef __IPHONE_26_0
118
+ #if defined( __IPHONE_26_0)
112
119
if (@available (iOS 26.0 , *)) {
120
+ #if !TARGET_OS_VISION
113
121
UIButtonConfiguration *configuration = [UIButtonConfiguration prominentGlassButtonConfiguration ];
114
122
configuration.baseForegroundColor = [UIColor blackColor ];
123
+ #else
124
+ UIButtonConfiguration *configuration = [UIButtonConfiguration filledButtonConfiguration ];
125
+ #endif
115
126
_doneIconButton.configuration = configuration;
116
127
}
117
128
#endif
@@ -139,9 +150,13 @@ - (void)setup {
139
150
_cancelIconButton = [UIButton buttonWithType: UIButtonTypeSystem];
140
151
[_cancelIconButton setImage: [TOCropToolbar cancelImage ] forState: UIControlStateNormal];
141
152
[_cancelIconButton addTarget: self action: @selector (buttonTapped: ) forControlEvents: UIControlEventTouchUpInside];
142
- #ifdef __IPHONE_26_0
153
+ #if defined( __IPHONE_26_0)
143
154
if (@available (iOS 26.0 , *)) {
155
+ #if !TARGET_OS_VISION
144
156
_cancelIconButton.configuration = [UIButtonConfiguration clearGlassButtonConfiguration ];
157
+ #else
158
+ _cancelIconButton.configuration = [UIButtonConfiguration filledButtonConfiguration ];
159
+ #endif
145
160
}
146
161
#endif
147
162
[self addSubview: _cancelIconButton];
0 commit comments