UIBezierPath-SVG icon indicating copy to clipboard operation
UIBezierPath-SVG copied to clipboard

Added a define option to print commands to create a UIBezierPath to stdout

Open ralfebert opened this issue 11 years ago • 3 comments

ralfebert avatar Apr 03 '13 14:04 ralfebert

Hi Ralf,

Thanks for the pull request. But I think Objective-C way to implement such type of logging is through forwardInvocation:. I made a gist as an example of possible implementation. With simple additions you can log any path operations.

Since proposed functionality implemented via forwardInvocation: will be generic to any UIBezierPath object, I think that this additions are beyond the scope of the project.

Cheers, Arthur

ap4y avatar Apr 03 '13 21:04 ap4y

I went for the hard-coded-ifdef-approach because of the relative coordinates like "path.currentPoint.x + params[0]".

ralfebert avatar Apr 03 '13 21:04 ralfebert

Yes I understand that it could be tricky to handle all possible params, but in the end this class category simply invokes methods of the provided path instance according to the svg command. So it easier to hook to the instance method calls, since objective-c provides such functionality.

ap4y avatar Apr 03 '13 23:04 ap4y