Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions iphone/Classes/TiUIiOSBlurView.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,26 @@ - (void)setGlassEffect_:(id)value
}
#endif

- (void)setBorderRadius_:(NSNumber *)borderRadius
- (void)setBorderRadius_:(id)borderRadius
{
#if IS_SDK_IOS_26
// The UICornerConfiguration is necessary to use the iOS 26+ glass effect API
if (@available(iOS 26.0, *)) {
blurView.cornerConfiguration = [UICornerConfiguration configurationWithRadius:[UICornerRadius fixedRadius:borderRadius.floatValue]];
if ([borderRadius isKindOfClass:[NSArray class]]) {
NSArray<NSNumber *> *borderRadii = (NSArray *)borderRadius;
UICornerRadius *topLeft = [[UICornerRadius fixedRadius:borderRadii[0].floatValue] retain];
UICornerRadius *topRight = [[UICornerRadius fixedRadius:borderRadii[1].floatValue] retain];
UICornerRadius *bottomLeft = [[UICornerRadius fixedRadius:borderRadii[2].floatValue] retain];
UICornerRadius *bottomRight = [[UICornerRadius fixedRadius:borderRadii[3].floatValue] retain];

blurView.cornerConfiguration = [UICornerConfiguration configurationWithTopLeftRadius:topLeft
topRightRadius:topRight
bottomLeftRadius:bottomLeft
bottomRightRadius:bottomRight];
} else {
CGFloat fixedBorderRadius = [(NSNumber *)borderRadius floatValue];
blurView.cornerConfiguration = [UICornerConfiguration configurationWithRadius:[UICornerRadius fixedRadius:fixedBorderRadius]];
}
return;
}
#endif
Expand Down
Loading