Skip to content

Instantly share code, notes, and snippets.

View SixFiveSoftware's full-sized avatar

BJ Miller SixFiveSoftware

View GitHub Profile
extension ImageConvertible where Self: RawRepresentable, Self.RawValue == String {
var image: UIImage? {
return UIImage(named: self.rawValue)
}
}
extension UIImage {
convenience init?<T: RawRepresentable>(image: T) where T.RawValue == String {
self.init(named: image.rawValue)