这是我的代码:
我想将线条的末端变成圆形,但它仍然是方形的,我应该怎么做?
let cross = UIBezierPath()
cross.move(to: CGPoint(x: skull.bounds.maxX, y: skull.bounds.minY))
cross.addLine(to: CGPoint(x: skull.bounds.minX, y: skull.bounds.maxY))
cross.close()
UIColor.red.set()
cross.lineWidth = 3.0
cross.lineCapStyle = .round
cross.stroke()
我想将线条的末端变成圆形,但它仍然是方形的,我应该怎么做?