Here is my current code:
override func viewDidLoad() {
super.viewDidLoad()
let rect = Draw(frame: CGRect(
origin: CGPoint(x: 50, y: 50),
size: CGSize(width: 100, height: 100)))
self.view.addSubview(rect)
}
Here is my current code:
override func viewDidLoad() {
super.viewDidLoad()
let rect = Draw(frame: CGRect(
origin: CGPoint(x: 50, y: 50),
size: CGSize(width: 100, height: 100)))
self.view.addSubview(rect)
}
Use this custom class, basically you need create a bezier path, using lines and quad curves, handling every corner with values in
@IBInspectable
properties.This is the code
Here is the results
Using this values
Hope this helps
Try this code. In my project it works fine.