Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: UIColor+Extensions.swift, line 176 #162

Open
AlexMcX opened this issue Dec 20, 2019 · 1 comment
Open

Fatal error: UIColor+Extensions.swift, line 176 #162

AlexMcX opened this issue Dec 20, 2019 · 1 comment

Comments

@AlexMcX
Copy link

AlexMcX commented Dec 20, 2019

Description of the Issue
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file ~Pods/SwiftSVG/SwiftSVG/SVG/Helpers/UIColor+Extensions.swift, line 176

Sample SVG
https://static.openfintech.io/payment_methods/piastrix/icon.svg

** FIX **
internal convenience init?(svgString: String) {

    if svgString.hasPrefix("#") {`
        self.init(hexString: svgString)`
        return`
    }
    
    if svgString.hasPrefix("rgba") {
        self.init(rgbaString: svgString)
        return
    }
    
    if svgString.hasPrefix("rgb") {
        self.init(rgbString: svgString)
        return
    }
    
    self.init(cssName: svgString)
}
@cornerAnt
Copy link

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants