Inherits from NSObject
Declared in TKDataSourceFilterDescriptor.h

Overview

A filter descriptor used in TKDataSource to filter items.

Properties

filterBlock

The block function that is used to filter items. This property has higher priority than the query.

@property (readonly, nullable) TKDataSourceFilterBlock filterBlock

Declared In

TKDataSourceFilterDescriptor.h

query

An SQL-like string query used when filtering items. Check the documentation of NSPredicate for detailed explanation for the syntax of this property value. The value of this property is ignored when the filterBlock property is set.

@property (nonatomic, readonly, nonnull) NSString *query

Declared In

TKDataSourceFilterDescriptor.h

Instance Methods

evaluate:

Returns true if the specified item should remain in the filtered list.

- (BOOL)evaluate:(id __nonnull)item

Parameters

item

The item to filter.

Declared In

TKDataSourceFilterDescriptor.h

initWithBlock:

Initializes the filter descriptor with a block function.

- (instancetype __nonnull)initWithBlock:(TKDataSourceFilterBlock __nonnull)filterBlock

Parameters

filterBlock

The block function that is used to filter items.

Declared In

TKDataSourceFilterDescriptor.h

initWithQuery:

Initializes the filter descriptor with a query.

- (instancetype __nonnull)initWithQuery:(NSString *__nonnull)query

Parameters

query

The query to use when filtering items.

Declared In

TKDataSourceFilterDescriptor.h