Inherits from NSObject
Declared in TKDataSourceGroupDescriptor.h

Overview

Represents a group descriptor that is used in TKDataSource to group items.

Properties

comparatorBlock

A comparator block to be used when sorting group items.

@property (readonly, nullable) NSComparator comparatorBlock

Declared In

TKDataSourceGroupDescriptor.h

keyForItemBlock

The block function that is used to define the group key. This property has higher priority than the propertyName.

@property (readonly, nullable) TKDataSourceMapFunctionBlock keyForItemBlock

Declared In

TKDataSourceGroupDescriptor.h

propertyName

The name of the property by which values are grouped. The value of this property is ignored when the keyForItemBlock property is set.

@property (nonatomic, copy, nullable) NSString *propertyName

Declared In

TKDataSourceGroupDescriptor.h

Instance Methods

initWithBlock:

Initializes the group descriptor with a block function.

- (instancetype __nonnull)initWithBlock:(TKDataSourceMapFunctionBlock __nonnull)keyForItemBlock

Parameters

keyForItemBlock

The block function that is used to define the group key.

Declared In

TKDataSourceGroupDescriptor.h

initWithBlock:comparator:

Initializes the group descriptor with a block function.

- (instancetype __nonnull)initWithBlock:(TKDataSourceMapFunctionBlock __nonnull)keyForItemBlock comparator:(NSComparator __nonnull)comparatorBlock

Parameters

keyForItemBlock

The block function that is used to define the group key.

comparatorBlock

The block functuon that is used to sort the groups.

Declared In

TKDataSourceGroupDescriptor.h

initWithProperty:

Initializes the group descriptor with a property name.

- (instancetype __nonnull)initWithProperty:(NSString *__nonnull)propertyName

Parameters

propertyName

The name of the property by which values are grouped.

Declared In

TKDataSourceGroupDescriptor.h

initWithProperty:comparator:

Initializes the group descriptor with a property name.

- (instancetype __nonnull)initWithProperty:(NSString *__nonnull)propertyName comparator:(NSComparator __nonnull)comparatorBlock

Parameters

propertyName

The name of the property by which values are grouped.

comparatorBlock

The block functuon that is used to sort the groups.

Declared In

TKDataSourceGroupDescriptor.h

keyForItem:

Returns the group key based on a specified item.

- (id __nonnull)keyForItem:(id __nonnull)item

Parameters

item

The item’s group key that is requested.

Declared In

TKDataSourceGroupDescriptor.h