I have downloaded "Add-to-Apple-Wallet" button from Apple website. But the format given is SVG.
The guidelines says that I should not modify the image. Should I use the SVG as it is in the project or can I convert it to pdf or png using some tool like sketch.
There are multiple options for displaying svg images on iPhone:
The iOS Browser actually renders SVG:
let url = URL.init(fileURLWithPath: Bundle.main.path(forResource: "Add_to_Apple_Wallet_rgb_HB", ofType: "svg")!)
webView.loadRequest(NSURLRequest.init(url: url) as URLRequest)
Or you can use a third party library:
SVGKit The most complete, supports multi path svg's.
PocketSVG Good, storyboard compatible, but you can only load single path svg's.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.