@@ -60,9 +60,16 @@ - (void)setup {
6060 UIView *containerView = self;
6161#ifdef __IPHONE_26_0
6262 if (@available (iOS 26.0 , *)) {
63+ UIVisualEffect *effect = nil ;
64+ #if !TARGET_OS_VISION
6365 UIGlassEffect *glassEffect = [UIGlassEffect effectWithStyle: UIGlassEffectStyleClear];
6466 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];
6673 _glassView.cornerConfiguration = [UICornerConfiguration capsuleConfiguration ];
6774 _glassView.userInteractionEnabled = YES ;
6875 [self addSubview: _glassView];
@@ -108,10 +115,14 @@ - (void)setup {
108115 [_doneIconButton setImage: [TOCropToolbar doneImage ] forState: UIControlStateNormal];
109116 [_doneIconButton setTintColor: [UIColor colorWithRed: 1 .0f green: 0 .8f blue: 0 .0f alpha: 1 .0f ]];
110117 [_doneIconButton addTarget: self action: @selector (buttonTapped: ) forControlEvents: UIControlEventTouchUpInside];
111- #ifdef __IPHONE_26_0
118+ #if defined( __IPHONE_26_0)
112119 if (@available (iOS 26.0 , *)) {
120+ #if !TARGET_OS_VISION
113121 UIButtonConfiguration *configuration = [UIButtonConfiguration prominentGlassButtonConfiguration ];
114122 configuration.baseForegroundColor = [UIColor blackColor ];
123+ #else
124+ UIButtonConfiguration *configuration = [UIButtonConfiguration filledButtonConfiguration ];
125+ #endif
115126 _doneIconButton.configuration = configuration;
116127 }
117128#endif
@@ -139,9 +150,13 @@ - (void)setup {
139150 _cancelIconButton = [UIButton buttonWithType: UIButtonTypeSystem];
140151 [_cancelIconButton setImage: [TOCropToolbar cancelImage ] forState: UIControlStateNormal];
141152 [_cancelIconButton addTarget: self action: @selector (buttonTapped: ) forControlEvents: UIControlEventTouchUpInside];
142- #ifdef __IPHONE_26_0
153+ #if defined( __IPHONE_26_0)
143154 if (@available (iOS 26.0 , *)) {
155+ #if !TARGET_OS_VISION
144156 _cancelIconButton.configuration = [UIButtonConfiguration clearGlassButtonConfiguration ];
157+ #else
158+ _cancelIconButton.configuration = [UIButtonConfiguration filledButtonConfiguration ];
159+ #endif
145160 }
146161#endif
147162 [self addSubview: _cancelIconButton];
0 commit comments