I\'m trying to find a way to draw a iOS 7-style icon \'squircle\' shape programmatically, using core graphics. I\'m not asking how to draw a rounded rectangle
in iOS 13/ Xcode 11 you can now use CALayerCornerCurve
Example
yourLayer.cornerCurver = CALayerCornerCurve.continuous
source: https://developer.apple.com/documentation/quartzcore/calayercornercurve