UIImage
public extension UIImage
-
Colorized image
Declaration
Swift
func colorized(with color: UIColor?) -> UIImage
Parameters
color
The color you want to change
Return Value
Colorized UIImage
-
Creates UIImage with grandiented colors
Declaration
Swift
class func gradiented(startColor: UIColor, endColor: UIColor, size: CGSize, horizontally: Bool = true) -> UIImage?
Parameters
startColor
Starting Color
endColor
Ending Color
size
Size of UIImage
horizontally
If true horizontal gradient, otherwise would be vertical
Return Value
Created UIImage with gradient background color
-
Returns by adding withRenderingMode(.alwaysOriginal)
Declaration
Swift
func original() -> UIImage