Skip to content

Commit f150563

Browse files
committed
Fixed up inconsistent glass view creation
1 parent 414cb19 commit f150563

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

TORoundedButton/TORoundedButton.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ IB_DESIGNABLE @interface TORoundedButton : UIControl
7878
/// When `backgroundStyle` is set to `.blur`, the specific blur style to apply.
7979
@property (nonatomic, assign) UIBlurEffectStyle blurStyle;
8080

81-
/// When `backgroundStyle` is set to `.blur`, the specific blur style to apply.
81+
/// When `backgroundStyle` is set to `.glass`, the specific glass style to apply.
8282
@property (nonatomic, assign) UIGlassEffectStyle glassStyle API_AVAILABLE(ios(26.0));
8383

8484
/// The text that is displayed in center of the button (Default is nil).

TORoundedButton/TORoundedButton.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ - (void)_setBackgroundTintColor:(UIColor *)tintColor {
300300
#ifdef __IPHONE_26_0
301301
if (@available(iOS 26.0, *)) {
302302
if (_backgroundStyle == TORoundedButtonBackgroundStyleGlass) {
303-
UIGlassEffect *effect = [UIGlassEffect effectWithStyle:UIGlassEffectStyleRegular];
303+
UIGlassEffect *effect = [UIGlassEffect effectWithStyle:_glassStyle];
304304
effect.tintColor = tintColor;
305305
[(UIVisualEffectView *)_backgroundView setEffect:effect];
306306
} else {
@@ -649,8 +649,7 @@ - (void)setGlassStyle:(UIGlassEffectStyle)glassStyle {
649649

650650
UIGlassEffect *const glassEffect = [UIGlassEffect effectWithStyle:_glassStyle];
651651
glassEffect.tintColor = self.tintColor;
652-
glassEffect.interactive = YES;
653-
652+
654653
UIVisualEffectView *const effectView = (UIVisualEffectView *)_backgroundView;
655654
[effectView setEffect:glassEffect];
656655
}

0 commit comments

Comments
 (0)