TKListViewDataSource Protocol Reference
Conforms to | NSObject |
Declared in | TKListView.h |
Overview
A delegate class exposing mothods to provide cells and supplementary views matching the source data.
Instance Methods
listView:cellForItemAtIndexPath:
Returns a TKListViewCell instance for a given index path. The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath:
- (TKListViewCell *__nullable)listView:(TKListView *__nonnull)listView cellForItemAtIndexPath:(NSIndexPath *__nonnull)indexPath
Parameters
- listView
The TKListView instance requesting the cell.
- indexPath
The index path we need a cell for.
Declared In
TKListView.h
listView:numberOfItemsInSection:
Returns the number of items conatined in specific section.
- (NSInteger)listView:(TKListView *__nonnull)listView numberOfItemsInSection:(NSInteger)section
Parameters
- listView
The TKListView instance requesting the information.
- section
The index for the section.
Declared In
TKListView.h
listView:viewForSupplementaryElementOfKind:atIndexPath:
Returns a view to be used as a section header or footer in TKListView. The cell that is returned must be retrieved from a call to -dequeueReusableSupplementaryViewOfKind:withReuseIdentifier:forIndexPath:
- (TKListViewReusableCell *__nullable)listView:(TKListView *__nonnull)listView viewForSupplementaryElementOfKind:(NSString *__nonnull)kind atIndexPath:(NSIndexPath *__nonnull)indexPath
Parameters
- listView
The TKListView instance requesting the cell.
- kind
The kind of the supplementary view e.g. TKListViewElementKindSectionHeader or TKListViewElementKindSectionFooter
- indexPath
The index path we need a cell for.
Declared In
TKListView.h
numberOfSectionsInListView:
Returns the number of sections.
- (NSInteger)numberOfSectionsInListView:(TKListView *__nonnull)listView
Parameters
- listView
The TKListView instance requesting the cell.
Declared In
TKListView.h