Inherits from TKGradientFill : TKFill : NSObject
Declared in TKLinearGradientFill.h

Overview

Represents a linear gradient fill.

Properties

endPoint

The end point of the gradient. Both values are in the interval of 0 to 1.

@property (nonatomic, assign) CGPoint endPoint

Declared In

TKLinearGradientFill.h

startPoint

The start point of the gradient. Both values are in the interval of 0 to 1.

@property (nonatomic, assign) CGPoint startPoint

Declared In

TKLinearGradientFill.h

Class Methods

linearGradientFillWithColors:

Creates a linear gradient fill with colors.

+ (instancetype __nonnull)linearGradientFillWithColors:(NSArray *__nonnull)colors

Parameters

colors

The array of UIColor containing gradient colors.

Declared In

TKLinearGradientFill.h

linearGradientFillWithColors:locations:startPoint:endPoint:

Creates a linear gradient fill with colors, locations, start point and end point.

+ (instancetype __nonnull)linearGradientFillWithColors:(NSArray *__nonnull)colors locations:(NSArray *__nonnull)locations startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint

Parameters

colors

The array of UIColor containing gradient colors.

locations

The array of NSNumber objects defining the location of each gradient stop in the interval of 0 to 1.

startPoint

The start point for gradient drawing. Both values are in the interval of 0 to 1.

endPoint

The end point for gradient drawing. Both values are in the interval of 0 to 1.

Declared In

TKLinearGradientFill.h

linearGradientFillWithColors:startPoint:endPoint:

Creates a linear gradient fill with colors, start point and end point.

+ (instancetype __nonnull)linearGradientFillWithColors:(NSArray *__nonnull)colors startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint

Parameters

colors

The array of UIColor containing gradient colors.

startPoint

The start point for gradient drawing. Both values are in the interval of 0 to 1.

endPoint

The end point for gradient drawing. Both values are in the interval of 0 to 1.

Declared In

TKLinearGradientFill.h

reverse:

Reverses a linear gradient fill.

+ (instancetype __nonnull)reverse:(TKLinearGradientFill *__nonnull)fill

Parameters

fill

The fill.

Return Value

The reversed fill.

Declared In

TKLinearGradientFill.h

Instance Methods

initWithColors:locations:startPoint:endPoint:

Initializes a linear gradient fill with colors, locations, start point and end point.

- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors locations:(NSArray *__nonnull)locations startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint

Parameters

colors

The array of UIColor containing gradient colors

locations

The array of NSNumber objects defining the location of each gradient stop in the interval of 0 to 1.

startPoint

The start point for gradient drawing. Both values are in the interval of 0 to 1.

endPoint

The end point for gradient drawing. Both values are in the interval of 0 to 1.

Declared In

TKLinearGradientFill.h

initWithColors:startPoint:endPoint:

Initializes a linear gradient fill with colors, start point and end point.

- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint

Parameters

colors

The array of UIColor containing gradient colors.

startPoint

The start point for gradient drawing. Both values are in the interval of 0 to 1.

endPoint

The end point for gradient drawing. Both values are in the interval of 0 to 1.

Declared In

TKLinearGradientFill.h