I have rect:CGRect
function inside my app, how can i use it ? I try
drawRect(CGRect,x1:33.33,y1:23.45)
but doesn't work my function under below.
func drawRect(rect: CGRect,x1: CGFloat, y1: CGFloat) {
let center = CGPoint(x:x1/2, y: y1/2)
let radius: CGFloat = max(bounds.width, bounds.height)
let arcWidth: CGFloat = 100
let startAngle: CGFloat = 3 * π / 5.99
let endAngle: CGFloat = π / 1.40
let path = UIBezierPath(arcCenter: center,
radius: radius/2 - arcWidth/2,
startAngle: startAngle,
endAngle: endAngle,
clockwise: true)
path.lineWidth = arcWidth
counterColor.setStroke()
path.stroke()
}