Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit c1ae9bd

Browse files
authored
[iOS] Fix bug with borderRadius's calculation. (#1929)
1 parent 0329d58 commit c1ae9bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ios/sdk/WeexSDK/Sources/Display/WXComponent+Display.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ - (BOOL)_bitmapOpaqueWithSize:(CGSize)size
581581
- (CAShapeLayer *)drawBorderRadiusMaskLayer:(CGRect)rect
582582
{
583583
if ([self hasBorderRadiusMaskLayer]) {
584-
UIBezierPath *bezierPath = [UIBezierPath wx_bezierPathWithRoundedRect:rect topLeft:_borderTopLeftRadius topRight:_borderTopRightRadius bottomLeft:_borderBottomLeftRadius bottomRight:_borderBottomRightRadius];
584+
WXRoundedRect *borderRect = [[WXRoundedRect alloc] initWithRect:rect topLeft:_borderTopLeftRadius topRight:_borderTopRightRadius bottomLeft:_borderBottomLeftRadius bottomRight:_borderBottomRightRadius];
585+
WXRadii *radii = borderRect.radii;
586+
UIBezierPath *bezierPath = [UIBezierPath wx_bezierPathWithRoundedRect:rect topLeft:radii.topLeft topRight:radii.topRight bottomLeft:radii.bottomLeft bottomRight:radii.bottomRight];
585587
CAShapeLayer *maskLayer = [CAShapeLayer layer];
586588
maskLayer.path = bezierPath.CGPath;
587589
return maskLayer;

0 commit comments

Comments
 (0)