0

Hope all of you folk will fine and doing there best. i have just started iphone app development this april. I want to draw svg on CGContext in iphone just like in android we can do. kindly follow the link for android SVG drawing Libraries.

SVG on Android

Lib No 1

My requirment,I just want to draw SVG on iphone CGContext for that i need any third party library. if any body have useful and exact information kindly help me out. How to draw SVG in iPhone?

Thanks in advance.

mark Gjel.

Community
  • 1
  • 1
DroidEngineer
  • 467
  • 2
  • 9
  • 20

3 Answers3

1

If the SVG is fixed, you could try Qwarkee which will generate a -drawRect: implementation which draws the equivalent SVG using just quartz functions.

The current version works best with Illustrator generated SVG files, but the developers tell me an update is coming in the next few days which will make the app work with a larger variety of files.

Mike Weller
  • 45,401
  • 15
  • 131
  • 151
0

not the perfect match for your question but check out SVGKit

SVGKit is a cross-platform Cocoa framework for rendering SVG files as Core Animation layers. All shapes are represented by instances of the CAShapeLayer class, and are, by design, animatable. SVGKit is compatible with the latest OS X and iOS SDK's.

CarlJ
  • 9,461
  • 3
  • 33
  • 47
  • i tried it out but it seems that it has missing some file likes "CALayerExporter.h" when i compiled it for ipad. – DroidEngineer Jun 06 '12 at 08:15
  • obviously not. The README wasn't very clear about that step - but it's been updated to be VERY clear now. Also, there's a simpler version coming soon, try it out here - https://github.com/adamgit/SVGKit/tree/transforms - it's stable, but sometimes gets exprimental commits. – Adam Jul 30 '12 at 14:29
0

SVGgh has an SVGRenderer class which can draw into a CGContextRef, so you can use it to print, generate a PDF or draw to a UIView or CALayer.

Glenn Howes
  • 5,447
  • 2
  • 25
  • 29