QuoteImage
public struct QuoteImage
Defines a custom Quote image, can be a square UIImage
, solid UIColor
or CAGradientLayer
.
-
Declaration
Swift
public var image: UIImage!
-
Declaration
Swift
public var alpha: CGFloat!
-
Declaration
Swift
public var textColor: UIColor!
-
Declaration
Swift
public var backgroundColor: UIColor!
-
Quote image from
UIImage
Declaration
Swift
public init(withImage image: UIImage, alpha: CGFloat = 1, textColor: UIColor = UIColor.white, backgroundColor: UIColor = UIColor.white)
Parameters
image
An
UIImage
to be used as background.alpha
The image opacity. Defaults to 1.
textColor
The color of quote text and custom logo. Defaults to white.
backgroundColor
The filter background color, if the image has a opacity this will appear. Defaults to white.
Return Value
A newly initialized
QuoteImage
object. -
Quote image from
CAGradientLayer
Declaration
Swift
public init(withGradient gradient: CAGradientLayer, alpha: CGFloat = 1, textColor: UIColor = UIColor.white, backgroundColor: UIColor = UIColor.white)
Parameters
gradient
A custom
CAGradientLayer
to make a gradient background.alpha
The image opacity. Defaults to 1.
textColor
The color of quote text and custom logo. Defaults to white.
backgroundColor
The filter background color, if the image has a opacity this will appear. Defaults to white.
Return Value
A newly initialized
QuoteImage
object. -
Quote image from
UIColor
Declaration
Swift
public init(withColor color: UIColor, alpha: CGFloat = 1, textColor: UIColor = UIColor.white, backgroundColor: UIColor = UIColor.white)
Parameters
color
A custom
UIColor
alpha
The image opacity. Defaults to 1.
textColor
The color of quote text and custom logo. Defaults to white.
backgroundColor
The filter background color, if the image has a opacity this will appear. Defaults to white.
Return Value
A newly initialized
QuoteImage
object.