Merge branch 'bugfix/cxtdt-67984' into 'develop'
Makes drawBottomCurvedShadowsOnRect more flexible by allowing the rect to be... See merge request BPHV_MIPS/mvm_core_ui!323
This commit is contained in:
commit
20ac9db0c7
@ -260,15 +260,15 @@ static const CGFloat VertialShadowOffset = 6;
|
||||
UIBezierPath *shadowPath = [UIBezierPath bezierPath];
|
||||
|
||||
//get the variables for frame
|
||||
CGFloat x = 0;
|
||||
CGFloat y = 0;
|
||||
CGFloat x = rect.origin.x;
|
||||
CGFloat y = rect.origin.y;
|
||||
CGFloat width = CGRectGetWidth(rect);
|
||||
CGFloat height = CGRectGetHeight(rect);
|
||||
|
||||
[shadowPath moveToPoint:CGPointMake(x + HorizontalShadowInset, y)];
|
||||
[shadowPath addLineToPoint:CGPointMake(width - HorizontalShadowInset, y)];
|
||||
[shadowPath addLineToPoint:CGPointMake(width - HorizontalShadowInset, height-VertialShadowOffset/2)];
|
||||
[shadowPath addQuadCurveToPoint:CGPointMake(x + HorizontalShadowInset, height - VertialShadowOffset/2) controlPoint:CGPointMake(width/2.f, height - VertialShadowOffset * 1.5)];
|
||||
[shadowPath addLineToPoint:CGPointMake(x + width - HorizontalShadowInset, y)];
|
||||
[shadowPath addLineToPoint:CGPointMake(x + width - HorizontalShadowInset, height-VertialShadowOffset/2)];
|
||||
[shadowPath addQuadCurveToPoint:CGPointMake(x + HorizontalShadowInset, height - VertialShadowOffset/2) controlPoint:CGPointMake((x + width)/2.f, height - VertialShadowOffset * 1.5)];
|
||||
[shadowPath addLineToPoint:CGPointMake(x + HorizontalShadowInset, y)];
|
||||
[shadowPath closePath];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user