Inherits from NSObject
Declared in TKChartPalette.h

Overview

Represents a palette of palette items. When colors are less than the requested index, the count starts over.

Properties

items

Returns palette items as an immutable array.

@property (nonatomic, strong, readonly) NSArray *items

Declared In

TKChartPalette.h

itemsCount

Returns the current palette items count.

@property (nonatomic, readonly) NSUInteger itemsCount

Declared In

TKChartPalette.h

Instance Methods

addPaletteItem:

Adds a palette item to the palette.

- (void)addPaletteItem:(TKChartPaletteItem *__nonnull)item

Parameters

item

The item to add.

Declared In

TKChartPalette.h

addPaletteItems:

Adds an array of palette items to the palette.

- (void)addPaletteItems:(NSArray *__nonnull)items

Parameters

items

The items to add.

Declared In

TKChartPalette.h

clearPalette

Removes all items from the palette.

- (void)clearPalette

Declared In

TKChartPalette.h

insertPaletteItem:atIndex:

Inserts an item at a specified index.

- (void)insertPaletteItem:(TKChartPaletteItem *__nonnull)item atIndex:(NSUInteger)index

Parameters

item

The item to insert.

index

The index to insert the item at.

Declared In

TKChartPalette.h

paletteItemAtIndex:

Returns a palette item at a specified index.

- (TKChartPaletteItem *__nullable)paletteItemAtIndex:(NSUInteger)index

Parameters

index

The index of the palette item. If this index is bigger than the current items count, the count starts over.

Return Value

The requested palette item. If there are no items in the palette, returns nil.

Declared In

TKChartPalette.h

replacePaletteItem:atIndex:

Replaces an item at a specified index.

- (void)replacePaletteItem:(TKChartPaletteItem *__nonnull)item atIndex:(NSUInteger)index

Parameters

item

The item to replace with.

index

The Index of the item to be replaced.

Declared In

TKChartPalette.h