Last active
July 30, 2017 17:31
-
-
Save RameshAran/96542a0edad03a7342d48e52e1c52763 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
enum AssetIdentifier: String { | |
case ImageIconOne = "icon_image_1" | |
case ImageIconTwo = "icon_image_2" | |
case ImageIconThree = "icon_image_3" | |
} | |
extension UIImage { | |
convenience init!(assetIdentifier: AssetIdentifier) { | |
self.init(named: assetIdentifier.rawValue) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference:-
WWDC video, Swift In Practice