Ios UIBezierPath视觉错误?
我正在用Ios UIBezierPath视觉错误?,ios,iphone,swift,xcode,uibezierpath,Ios,Iphone,Swift,Xcode,Uibezierpath,我正在用UIBezierPath绘制一个形状,我的弧有问题,我正在向您展示我的代码: ... rightUpPath.move(to: CGPoint(x: 0, y: height/2)) rightUpPath.addArc(withCenter: CGPoint(x: cornerRadiusView, y: height - cornerRadiusView), radius: cornerRadiusView,
UIBezierPath
绘制一个形状,我的弧有问题,我正在向您展示我的代码:
...
rightUpPath.move(to: CGPoint(x: 0, y: height/2))
rightUpPath.addArc(withCenter: CGPoint(x: cornerRadiusView, y: height - cornerRadiusView),
radius: cornerRadiusView,
startAngle: .pi,
endAngle: (.pi * 2) / 3,
clockwise: false)
rightUpPath.addLine(to: CGPoint(x: self.bounds.size.width - cornerRadiusView, y: height))
...
考虑到高度等于40,cornerRadiusView=10。弧的底部通常等于形状的底部,但这表明:
我希望圆弧的底部等于灰色形状的高度,有人能告诉我哪里做错了吗?好的,我的问题很愚蠢: 我更改我的
端角:(.pi*2)/3
至端角:.pi/2