Menu
  • HOME
  • TAGS

how to use SVGKImage change SVG fill color?

ios,svgkit

You have to use the CALayer sub-layers to changing the color : SVGKImage *svgImage = [SVGKImage imageNamed:@"Anchor.svg"]; SVGKLayeredImageView *svgImageView = [[SVGKLayeredImageView alloc] initWithSVGKImage:svgImage]; [capturedImageView addSubview:svgImageView]; CALayer* layer = svgImageView.layer; for (CALayer *subLayer in layer.sublayers) { DLog(@"%@", [subLayer class]); for (CALayer *subSubLayer in subLayer.sublayers) { DLog(@"%@", [subSubLayer class]); for (CALayer *subSubSubLayer...

import non-ARC code compiled .a file in ARC enabled project

ios,objective-c,svgkit

is it safe From an ARC point of view, certainly. ARC operates at compiler level - and your library is already compiled. One way or another, it is already doing whatever memory management it is doing. Now, there may be other reason why you'd have trouble linking to a...