问题描述
如何制作这样的形状
func createShape() {
bezierPath = UIBezierPath()
bezierPath.move(to: .zero)
bezierPath.addLine(to: CGPoint(x:self.frame.width,y: self.frame.origin.y))
bezierPath.addLine(to: CGPoint(x: self.frame.width,y: self.frame.height / 2))
bezierPath.addCurve(to: CGPoint(x:self.frame.width/2,y: self.frame.height),controlPoint1: CGPoint(x: self.frame.width,y: self.frame.height / 2),controlPoint2: CGPoint(x:self.frame.width/2 + 33,y: self.frame.height))
bezierPath.addCurve(to: CGPoint(x: 0,controlPoint1: CGPoint(x: self.frame.width/2 - 33,y:self.frame.height),controlPoint2: CGPoint(x: 0,y: self.frame.height / 2))
bezierPath.addLine(to: .zero)
bezierPath.close()
}
结果我得到了
你能帮我吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)