mchoe / SwiftSVG

A simple, performant, and lightweight SVG parser
Other
1.94k stars 229 forks source link

UIColor built-in init(named:) overwritten by extension #104

Open akiroz opened 6 years ago

akiroz commented 6 years ago

The built-in init for using named colors from the asset catalog is overwritten by the extension here: https://github.com/mchoe/SwiftSVG/blob/c5a6d75ccd4a1ae7af764bf96eaa6d341d4f2d44/SwiftSVG/SVG/Helpers/UIColor%2BExtensions.swift#L167 ref: https://developer.apple.com/documentation/uikit/uicolor/2877380-init

Paladinfeng commented 5 years ago

Same error, This method is too unprofessional

Fallen-Zen commented 5 years ago

And I think it's the cause of this crash for me, asset is definitely present:

Screenshot 2019-07-11 at 11 39 42