UIImage
extension UIImage
-
This allows us to create a simple “filled color” image.
From here: https://stackoverflow.com/a/33675160/879365
Declaration
Swift
public convenience init?(color: UIColor, size: CGSize = CGSize(width: 1, height: 1))
Parameters
color
The UIColor we want to fill the image with.
size
An optional parameter (default is zero) that designates the size of the image.