UIBezierPath-SVG
UIBezierPath-SVG copied to clipboard
Added a define option to print commands to create a UIBezierPath to stdout
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
I went for the hard-coded-ifdef-approach because of the relative coordinates like "path.currentPoint.x + params[0]".
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.