in SampleApp/RootViewController.swift [56:72]
func importButtonTapped() {
if let data = (specializedView.textView.text ?? "").data(using: .utf8) {
switch VectorDrawable.create(from: data) {
case .ok(let drawable):
navigationController
.orAssert("This view controller requires a navigation controller to function correctly")?
.pushViewController(DisplayViewController(drawable: drawable,
theme: theme,
resources: resources),
animated: true)
case .error(let error):
showError(message: error)
}
} else {
showError(message: "Couldn't convert the text to UTF-8.")
}
}