Created
March 15, 2016 07:12
-
-
Save kgn/2bcf0d6e4f38d5fe274a 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
func tintColor(configData: NSDictionary) -> UIColor? { | |
guard let tintColor = configData["tint_color"] as? [String: CGFloat] else { | |
return nil | |
} | |
guard let r = tintColor["red"], g = tintColor["green"], b = tintColor["blue"] else { | |
return nil | |
} | |
return UIColor(red: r, green: g, blue: b, alpha: 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment