Swift UIView draw diagonal one side and round corner
问题 I am drawing some view with diagonal side like this: code: let layerWidth = layer.frame.width let bezierPath = UIBezierPath() let pointA = CGPoint(x: 0, y: 44) let pointB = CGPoint(x: 150, y: 0) let pointC = CGPoint(x: layerWidth, y: 0) let pointD = CGPoint(x: layerWidth, y:44) bezierPath.move(to: CGPoint(x: pointA.x, y: pointA.y) ) bezierPath.addLine(to: CGPoint(x: pointB.x, y: pointB.y)) bezierPath.addLine(to: pointC) bezierPath.addLine(to: pointD) bezierPath.close() let shapeLayer =