GradientView
@IBDesignable
final class GradientView : UIView
View that contains a gradient
-
Gradient starting color
Declaration
Swift
@IBInspectable var startColor: UIColor { get set }
-
Gradient ending color
Declaration
Swift
@IBInspectable var endColor: UIColor { get set }
-
Gradient orientation
Declaration
Swift
@IBInspectable var orientation: Int { get set }
-
Simple gradient setter
Declaration
Swift
func set(gradient colors: [UIColor], orientation direction: GradientOrientation)
Parameters
colors
Color array
direction
GradientOrientation
-
Procedural intializer
Declaration
Swift
override init(frame: CGRect)
Parameters
frame
Display frame
-
Update screen rendering
Declaration
Swift
override func layoutSublayers(of layer: CALayer)
Parameters
layer
Our layer
-
Set predefined style
Declaration
Swift
func set(style: Styler)
Parameters
style
Style definition