4 ms·
I thought the official math on the curves was a proprietary secret, no? I recall early iPhone/iPod official case dimension documents never calling out the radiu
by nofunsir 9y ago
I thought the official math on the curves was a proprietary secret, no? I recall early iPhone/iPod official case dimension documents never calling out the radius because it didn't exist.
EDIT: Maybe it's somewhere in here: https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf https://developer.apple.com/accessories/Accessory-Design-Gui...
- EpicEng 9y agoI feel like that would be pretty trivial to reverse engineer if anyone cared to.
- wll 9y agoOn iOS 11, CALayer has a `continuousCorners` private property [0]. I did a spartan reverse engineering by recreating the UIBezierPath equivalent of the two types of radii found in the Apple Design Resources [1], then adding a convenience initializer on UIBezierPath that recreates the shape with arbitrary radius of the chosen kind (either UISwitch-like, or App Icon-like). Earlier attempts include the fascinating Unleashing Genetic Algorithms on the iOS 7 Icon [2]. [0] https://mobile.twitter.com/argentumko/status/955773459463790592 https://mobile.twitter.com/argentumko/status/955773459463790... [1] https://developer.apple.com/design/resources/ https://developer.apple.com/design/resources/ [2] http://blog.mikeswanson.com/post/62341902567/unleashing-genetic-algorithms-on-the-ios-7-icon http://blog.mikeswanson.com/post/62341902567/unleashing-gene...