CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Jan 2017 |
| SwiftSwift Version | 3.0 |
| SPMSupports SPM | ✗ |
Maintained by Daniela Dias, Shagun Madhikarmi.
An iOS helper class for creating a UIImage from a UIColor.
UIImage+Color.swift file from the Sources folder to your Xcode project.For creating a UIImage from a UIColor
let image = UIImage.imageFromColor(UIColor.blue)
// Applying the image to the background of a UIButton
button.setBackgroundImage(image, forState: .normal)
To specify the size of the image:
let image = UIImage.imageFromColor(UIColor.blue, width: 1.0, height: 2.0)
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See the Code of Conduct file.
UIImageColorSwift is released under the MIT License. See License.