4 ms·
I feel like that would be pretty trivial to reverse engineer if anyone cared to.
by EpicEng 9y ago
I 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...