objective c - How to generate CGPath values from logo -
at bottom of this page there's interesting animation. it's animating cashapelayer
uipangesturerecognizer
.
animation http://ronnqvi.st/images/peak.gif
i wanted see how accomplished went github page , found this. below small piece of code.
- (cgpathref)loadpath { cgmutablepathref path = cgpathcreatemutable(); // load cgpathmovetopoint(path, null, 7.50878897, 25.2871097); cgpathaddcurvetopoint(path, null, 7.50878897, 25.2871097, 21.7333976, 26.7812495, 29.6894527, 20.225586); cgpathaddcurvetopoint(path, null, 37.6455074, 13.6699219, 39.367189, 3.85742195, 31.9697262, 1.25976564); cgpathaddcurvetopoint(path, null, 24.5722639, -1.33789083, 21.99707, 10.9072268, 21.99707, 22.2255862); cgpathaddcurvetopoint(path, null, 21.9970685, 33.5439456, 15.9355469, 45.8212894, 8.99707031, 47.7294922); ...
how can generate these cgpath
values? kind of example helpful.
you can build simple svg , use https://github.com/arielelkin/pocketsvg
Comments
Post a Comment