我想将svg(可缩放矢量图形)图像设置为ipad.so中的按钮图像,我可以将相同的图像用于ipad2,ipad3
答案 0 :(得分:1)
您必须使用third party个库。 Quartz不了解SVG。
答案 1 :(得分:0)
您也可以使用https://github.com/arielelkin/PocketSVG
//Step 1
CGPathRef myPath = [PocketSVG pathFromSVGFileNamed:@"icon_convidar"];
//Step 2: To display it on screen, you can create a CAShapeLayer
//and set myPath as its path property:
CAShapeLayer *shape = [CAShapeLayer layer];
shape.path = myPath;
//Step 3: Fiddle with it using CAShapeLayer's properties:
shape.strokeColor = [UIColor redColor].CGColor;
shape.lineWidth = 4;
//Step 4: Display it!
[self.btnConvidar.layer addSublayer:shape];