Draw iOS 7-style squircle programmatically
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 . A squircle is a superellipse: which is slightly different than a regular rounded rectangle: It's exact formula is readily available . However, I can't figure out how to draw this using, for example, a CGPath, let alone fill it, and be able to resize it rather easily. All this while being entirely exact with the formula. Quote from Wikipedia: Superellipse For n = 1/2, in particular, each of the four arcs is a Quadratic Bézier curve defined