某一个角圆弧型

UIView*containerView=[[UIViewalloc]initWithFrame:CGRectMake(0,0,320,568)];

[self.viewaddSubview:self.containerView];

CGRectrect =CGRectMake(50,50,100,100);

CGSizeradii =CGSizeMake(20,20);

UIRectCornercorners =UIRectCornerBottomRight|UIRectCornerBottomLeft;

UIBezierPath*path = [UIBezierPathbezierPathWithRoundedRect:rectbyRoundingCorners:cornerscornerRadii:radii];

containerView=[[UIViewalloc]initWithFrame:rect];

CAShapeLayer*shapeLayer = [CAShapeLayerlayer];

shapeLayer.strokeColor= [UIColorredColor].CGColor;

shapeLayer.fillColor= [UIColoryellowColor].CGColor;

shapeLayer.lineWidth=5;

shapeLayer.lineJoin=kCALineJoinRound;

shapeLayer.lineCap=kCALineCapRound;

shapeLayer.path= path.CGPath;

[containerView.layeraddSublayer:shapeLayer];

你可能感兴趣的:(某一个角圆弧型)