BPKGradientView
@interface BPKGradientView : UIView
This class is a UIView
subclass for correctly drawing non-square gradients.
It’s backed by a layer that does the actual drawing, but using this view directly
is preferred.
Changing the bounds or updating the gradient property causes this view to redraw on the next display pass.
-
The gradient currently being drawn. Setting this will cause the view to redraw with the new gradient.
Declaration
Objective-C
@property (nonatomic, strong, nullable) BPKGradient *gradient;
Swift
var gradient: BPKGradient? { get set }
-
Create a gradient view with the specified
BPKGradient
.Declaration
Objective-C
- (nonnull instancetype)initWithGradient:(nonnull BPKGradient *)gradient;
Swift
init(gradient: BPKGradient)
Parameters
gradient
The gradient to use for drawing the view.