0
votes

I want to display a UITableView full of SVG images. I get an xml string of the svg tag from the server and want to be able to paint the images inside a UITableViewCell on a background thread. My approach was to convert the svg to a UIImage and cache it, then load it into a UIImageView in the cell.

I've looked at SVGKit but there doesn't seem to be a way to create an SVGView from a string (only from a file currently), plus when I do the file store then retrieve for an SVGView, it's incredibly slow.

So does anyone know of a fast way to convert the SVG string to a UIImage on a background thread (outside of a drawRect function)?

1

1 Answers

1
votes

Have you already tried to get an NSData object with the SVG string content, then use - (id)initWithData:(NSData *)data to get the image?