TKRadialGradientFill Class Reference
Inherits from | TKGradientFill : TKFill : NSObject |
Declared in | TKRadialGradientFill.h |
Properties
endCenter
The end center for radial gradients. The default value is (0.5f, 1.0f).
@property (nonatomic, assign) CGPoint endCenter
Declared In
TKRadialGradientFill.h
endRadius
The radius of a end circle with center at the end point. Used only for radial gradients. The default value is 0.5 (with TKGradientRadiusType = TKGradientRadiusTypeRectMin).
@property (nonatomic, assign) CGFloat endRadius
Declared In
TKRadialGradientFill.h
gradientRadiusType
The units used for startRadius and endRadius. The default value is TKGradientRadiusTypeRectMin.
@property (nonatomic, assign) TKGradientRadiusType gradientRadiusType
Discussion
The radius types are defined as follows:
typedef enum {
TKGradientRadiusTypePixels, // The radius is in pixels.
TKGradientRadiusTypeRectMin, // The radius is in the interval of 0 (0%) to 1 (100%) using minimum of drawing rectangle sizes.
TKGradientRadiusTypeRectMax // The radius is in interval of 0 (0%) to 1 (100%) using maximum of drawing rectangle sizes.
} TKGradientRadiusType;
Declared In
TKRadialGradientFill.h
startCenter
The start center for radial gradients. The default value is (0.5f, 0.0f).
@property (nonatomic, assign) CGPoint startCenter
Declared In
TKRadialGradientFill.h
startRadius
The radius of a start circle with center at the start point. Used only for radial gradients. The default value is 0.5 (with TKGradientRadiusType = TKGradientRadiusTypeRectMin).
@property (nonatomic, assign) CGFloat startRadius
Declared In
TKRadialGradientFill.h
Class Methods
Instance Methods
initWithColors:startCenter:startRadius:endCenter:endRadius:
Initializes a radial gradient fill.
- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors startCenter:(CGPoint)startCenter startRadius:(CGFloat)startRadius endCenter:(CGPoint)endCenter endRadius:(CGFloat)endRadius
Parameters
- colors
The array of UIColor containing gradient colors.
- startCenter
The center point for gradient drawing. Both values are in the interval of 0 to 1.
- startRadius
The radius of start circle.
- endCenter
The end point for gradient drawing. Both values are in the interval of 0 to 1.
- endRadius
The radius of end circle.
Declared In
TKRadialGradientFill.h
initWithColors:startCenter:startRadius:endCenter:endRadius:radiusType:
Initializes a radial gradient fill.
- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors startCenter:(CGPoint)startCenter startRadius:(CGFloat)startRadius endCenter:(CGPoint)endCenter endRadius:(CGFloat)endRadius radiusType:(TKGradientRadiusType)radiusType
Parameters
- colors
The array of UIColor containing gradient colors.
- startCenter
The center point for gradient drawing. Both values are in the interval of 0 to 1.
- startRadius
The radius of start circle.
- endCenter
The end point for gradient drawing. Both values are in the interval of 0 to 1.
- endRadius
The radius of end circle.
- radiusType
The radius type.
Declared In
TKRadialGradientFill.h