Display SVG file and display annotation over SVG file in iOS

I want to display the SVG file in an iOS application, analyze the coordinate data and display the annotation on top of the SVG image based on the coordinates (something similar to the display annotation MKMapViewwith lat / long based conclusions).

I came across two approaches:

  • Use UIWebView: UIWebViewdisplays my SVG file perfectly. And then I can use the HTML parser to get the coordinates. But then I’m not sure how to put annotations on top of the web view, so that when zooming or panning the image, the annotation is not broken, like a map display.

  • Use SVGKit: I downloaded SVGKitand then tried to render my SVG file. Some part of the SVG image is not displayed properly.

Any help or guidance would be greatly appreciated.

Thank.

+5
source share

All Articles