An easy way to draw a circle using CAShapeLayer
An easy way to draw a circle is to create a CAShapeLayer and add a UIBezierPath. objective-c CAShapeLayer *circleLayer = [CAShapeLayer layer]; [circleLayer setPath:[[UIBezierPath bezierPathWithOvalInRect:CGRectMake(50, 50, 100, 100)] CGPath]]; swift let circleLayer = CAShapeLayer(); circleLayer.path = UIBezierPath(ovalIn: CGRect(x: 50, y: 50, width: 100, height: 100)).cgPath; After creating the CAShapeLayer we set its path to be … Read more