UIImage
extension UIImage
-
Create a simple gradient image from inStartColor on left and inEndColor on right (if horizontal), or inStartColor on top, and inEndColor on bottom (if vertical)
Declaration
Swift
static func gradientImage(from inStartColor: UIColor, to inEndColor: UIColor, with inFrame: CGRect, isVertical inIsVertical: Bool = false) -> UIImageParameters
inStartColorleft side or top
inEndColorright side or bottom
inFrameframe to be filled (Cannot be empty)
inIsVerticalTrue, if the gradient is top to bottom (default is false)
Return Value
a gradient image, or a “nosign” image.
View on GitHub
Install in Dash