An UIView that displays a single SVG image in your interface.
Creating a SVGUIView:
let data = Bundle.main.url(forResource: "example", withExtension: "svg")!
let svgView = SVGUIView(contentsOf: data)!
view.addSubView(svgView)
Add the SVGUIView
as a dependency:
let package = Package(
// name, platforms, products, etc.
dependencies: [
// other dependencies
.package(url: "https://github.com/nnabeyang/SVGUIView", from: "0.19.1"),
],
targets: [
.executableTarget(name: "<executable-target-name>", dependencies: [
// other dependencies
.product(name: "SVGUIView", package: "SVGUIView"),
]),
// other targets
]
)
Add the following to your Podfile:
pod 'SVGUIView'
SVGUIView is published under the MIT License, see LICENSE.