Closed onato closed 4 years ago
I don't think I'll be able to add support for this in any time in the near future. I have yet another rewrite of the library in mind that could support this feature, so I want to keep it in mind. Thanks @onato for the suggestion though.
In the meantime, you may be able to grab the layer by the name
property on the CALayer
which maps from the id
attribute on the <path>
or <g>
. Check out the Identifiable
protocol for more info.
SVG supports setting the fill color to
currentColor
. This can be seen in the following example where the group sets it's children's default fill color.Setting the
currentColor
to orange should looks like this:I can't simply set the fill color because this will overwrite the color of the
rect
and just render a square.It doesn't seem trivial to add support for passing the current color into the initializers. I have a dirty solution that sets the fillColor of any layer that is black (The
currentColor
ends up being black).