Tutorial by Examples

UIBezierPath using to create a circular path ShapeLayer CAShapeLayer *circleLayer = [CAShapeLayer layer]; [circleLayer setPath:[[UIBezierPath bezierPathWithOvalInRect: CGRectMake(50, 50, 100, 100)] CGPath]]; circleLayer.lineWidth = 2.0; [circleLayer setStrokeColor:[[UIColor redColor] CGColor]];...
CAShapeLayer *mask = [[CAShapeLayer alloc] init]; mask.frame = CGRectMake(50, 50, 100, 100); CGFloat width = 100; CGFloat height = 100; CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, nil, 30, 30); CGPathAddLineToPoint(path, nil, width, 30); CGPathAddLine...
CAShapeLayer *circle = [CAShapeLayer layer]; [circle setPath:[[UIBezierPath bezierPathWithOvalInRect:CGRectMake(100, 100, 150, 150)] CGPath]]; [circle setStrokeColor:[[UIColor blueColor] CGColor]]; [circle setFillColor:[[UIColor clearColor] CGColor]]; [[self....
CAShapeLayer *circle = [CAShapeLayer layer]; [circle setPath:[[UIBezierPath bezierPathWithOvalInRect:CGRectMake(100, 100, 150, 150)] CGPath]]; [circle setStrokeColor:[[UIColor blueColor] CGColor]]; [circle setFillColor:[[UIColor clearColor] CGColor]]; [[self.view layer] addSublayer:circl...

Page 1 of 1