Inherits from TKFill : NSObject
Declared in TKGradientFill.h

Overview

Represents an abstract gradient fill class.

Properties

colors

The array of UIColor containing gradient colors.

@property (nonatomic, strong, nonnull) NSArray<UIColor*> *colors

Declared In

TKGradientFill.h

locations

The array of NSNumber objects defining the location of each gradient stop in the interval of 0 to 1. If nil, the stops are spread uniformly across the range. The defaults is nil.

@property (nonatomic, strong, nonnull) NSArray<NSNumber*> *locations

Declared In

TKGradientFill.h

Instance Methods

initWithColors:

Initializes a linear gradient brush with colors.

- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors

Parameters

colors

The array of UIColor containing gradient colors.

Declared In

TKGradientFill.h

initWithColors:cornerRadius:

Initializes a linear gradient brush with colors and corner radius.

- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors cornerRadius:(CGFloat)cornerRadius

Parameters

colors

The array of UIColor containing gradient colors.

cornerRadius

The corner radius in points.

Declared In

TKGradientFill.h

initWithColors:locations:

Initializes a linear gradient brush with colors and locations.

- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors locations:(NSArray *__nonnull)locations

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.

Declared In

TKGradientFill.h

initWithColors:locations:cornerRadius:

Initializes a linear gradient brush with colors, locations, and corder radius.

- (instancetype __nonnull)initWithColors:(NSArray *__nonnull)colors locations:(NSArray *__nonnull)locations cornerRadius:(CGFloat)cornerRadius

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.

cornerRadius

The corner radius in points.

Declared In

TKGradientFill.h