Reputation: 39
I want to set svg(scalable vector graphics) images as button images in ipad.so that i can use same image for ipad2,ipad3
Upvotes: 1
Views: 2335
Reputation: 298
You can also use 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];
Upvotes: 0
Reputation: 789
You have to use third party libraries. Quartz is not aware of SVG.
Upvotes: 1