Inherits from NSObject
Declared in TLIndexPathItem.h

Overview

A data item wrapper class that provides identifier and section name properties. TLIndexPathTools knows about and will use these properties automatically as specified in the TLIndexPathDataModel identifier and section name rules. This means the more verbose [TLIndexPathTools initWithItems:sectionNameKeyPath:identifierKeyPath] initializer is unneccessary. Use the [TLIndexPathTools initWithItems:] initializer.

This class also provides a cellIdentifier property. If this property is set, TLTableViewController and TLCollectionViewController automatically use this value as the reuse identifier when dequeing cells.

This class can be useful for settings-type views where there are multiple cell prototypes, heterogeneous data and sections.

Properties

cellIdentifier

@property (strong, nonatomic) NSString *cellIdentifier

data

@property (strong, nonatomic) id data

identifier

@property (strong, nonatomic) id identifier

sectionName

@property (strong, nonatomic) NSString *sectionName

shouldCompareData

Returns YES if the item should be considered modified if the data is modified. This affects whether or not the corresponding cell is reloaded in a batch update. Specifically, if the value is YES, the hash and isEqual methods take into account the value of data. The default value is NO.

@property (nonatomic) BOOL shouldCompareData

Declared In

TLIndexPathItem.h

Class Methods

identifiersForIndexPathItems:

Returns the array of identifiers for the given NSIndexPathItems

+ (NSArray *)identifiersForIndexPathItems:(NSArray *)indexPathItems

Declared In

TLIndexPathItem.h

keyPathForDataKeyPath:

Prefixes “data.” to the given keyPath.

+ (NSString *)keyPathForDataKeyPath:(NSString *)dataKeyPath

Declared In

TLIndexPathItem.h

Instance Methods

initWithIdentifier:sectionName:cellIdentifier:data:

- (id)initWithIdentifier:(id)identifier sectionName:(NSString *)sectionName cellIdentifier:(NSString *)cellIdentifier data:(id)data