How to create Right Angle View in Swift?
问题 I am able to create triangle view in swift using below code- class TriangleView: UIView { override func draw(_ rect: CGRect) { // Get Height and Width let layerHeight = layer.frame.height let layerWidth = layer.frame.width // Create Path let bezierPath = UIBezierPath() // Draw Points bezierPath.move(to: CGPoint(x: 0, y: layerHeight)) bezierPath.addLine(to: CGPoint(x: layerWidth, y: layerHeight)) bezierPath.addLine(to: CGPoint(x: layerWidth / 2, y: 0)) bezierPath.addLine(to: CGPoint(x: 0, y: