TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Oct 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Gabriel Massana.
Swift Extension to convert hexadecimal values into UIColor Objects.
Hex formats allowed:
platform :ios, '8.0'
use_frameworks!
pod 'ColorWithHex', '~> 0.0'
Then, run the following command:
$ pod install
Drag into your project the folder /ColorWithHex-iOS
. That’s all.
let shortHexHash: UIColor = UIColor.colorWithHex("#f80")
let shortHex: UIColor = UIColor.colorWithHex("f80")
let hex: UIColor = UIColor.colorWithHex("ff8800")
let hexAlpha: UIColor = UIColor.colorWithHex("ff880080")
let hexHash: UIColor = UIColor.colorWithHex("#20aa45")
let hexHashAlpha: UIColor = UIColor.colorWithHex("#20aa4580")
#import "ColorWithHex-Swift.h"
...
UIColor *shortHexHash = [UIColor cwh_colorWithHex: @"#f80"];
UIColor *shortHex = [UIColor cwh_colorWithHex: @"f80"];
UIColor *hex = [UIColor cwh_colorWithHex: @"ff8800"];
UIColor *hexAlpha = [UIColor cwh_colorWithHex: @"ff880080"];
UIColor *hexAlpha = [UIColor cwh_colorWithHex: @"#20aa45"];
UIColor *hexHash = [UIColor cwh_colorWithHex: @"#20aa4580"];
ColorWithHex-iOS is released under the MIT license. Please see the file called LICENSE.
$ git tag -a 2.0.0 -m 'Version 0.0.0'
$ git push --tags
Gabriel Massana
Please open a new Issue here if you run into a problem specific to ColorWithHex-iOS, have a feature request, or want to share a comment.