Conforms to UIScrollViewDelegate
Declared in TKListView.h

Overview

The TKListViewDelegate protocol defines methods that allow you to manage the selection of items in TKListView, to perform actions on those items, and respond to interaction with those items.

Instance Methods

listView:didDeselectItemAtIndexPath:

This method is called after deselecting an item.

- (void)listView:(TKListView *__nonnull)listView didDeselectItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

indexPath

The index path of the deselected item.

Declared In

TKListView.h

listView:didFinishSwipeCell:atIndexPath:withOffset:

This method is called after the user has finished swiping a cell.

- (void)listView:(TKListView *__nonnull)listView didFinishSwipeCell:(TKListViewCell *__nonnull)cell atIndexPath:(NSIndexPath *__nonnull)indexPath withOffset:(CGPoint)offset

Parameters

listView

The TKListView instance.

cell

The TKListViewCell instance being swiped.

indexPath

The index path of the cell being swiped.

offset

The swipe offset.

Declared In

TKListView.h

listView:didHighlightItemAtIndexPath:

This method is called after highliting an item.

- (void)listView:(TKListView *__nonnull)listView didHighlightItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

indexPath

The index path of the highlighted item.

Declared In

TKListView.h

listView:didLongPressCell:atIndexPath:

This method is called after the user long pressed a cell.

- (void)listView:(TKListView *__nonnull)listView didLongPressCell:(TKListViewCell *__nonnull)cell atIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

cell

The TKListViewCell instance being long pressed.

indexPath

The index path of the cell being long pressed.

Declared In

TKListView.h

listView:didPullWithOffset:

This method is called when the user pulls the list view to refresh its data.

- (void)listView:(TKListView *__nonnull)listView didPullWithOffset:(CGFloat)offset

Parameters

listView

The TKListView instance.

offset

The pull offset.

Declared In

TKListView.h

listView:didReorderItemFromIndexPath:toIndexPath:

This method is called after reordering an item an item.

- (void)listView:(TKListView *__nonnull)listView didReorderItemFromIndexPath:(NSIndexPath *__nonnull)originalIndexPath toIndexPath:(NSIndexPath *__nonnull)targetIndexPath

Parameters

listView

The TKListView instance.

originalIndexPath

The index path we move the item from.

targetIndexPath

The index path we move the item to.

Declared In

TKListView.h

listView:didSelectItemAtIndexPath:

This method is called after selecting an item.

- (void)listView:(TKListView *__nonnull)listView didSelectItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

indexPath

The index path of the selected item.

Declared In

TKListView.h

listView:didSwipeCell:atIndexPath:withOffset:

This method is called when the user swipes a cell. This method is called after shouldSwipeCell and before didFinishSwipingCell.

- (void)listView:(TKListView *__nonnull)listView didSwipeCell:(TKListViewCell *__nonnull)cell atIndexPath:(NSIndexPath *__nonnull)indexPath withOffset:(CGPoint)offset

Parameters

listView

The TKListView instance.

cell

The TKListViewCell instance being swiped.

indexPath

The index path of the cell being swiped.

offset

The swipe offset.

Declared In

TKListView.h

listView:didUnhighlightItemAtIndexPath:

This method is called after unhighliting an item.

- (void)listView:(TKListView *__nonnull)listView didUnhighlightItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

indexPath

The index path of the unhighlighted item.

Declared In

TKListView.h

listView:shouldDeselectItemAtIndexPath:

Returns a boolean value indicating whether the specified item should be deselected.

- (BOOL)listView:(TKListView *__nonnull)listView shouldDeselectItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance requesting this information.

indexPath

The index path of the item about to be deselected.

Return Value

YES if the item should be selected.

Declared In

TKListView.h

listView:shouldHighlightItemAtIndexPath:

  • Returns a boolean value indicating whether the specified item should be highlighted.
- (BOOL)listView:(TKListView *__nonnull)listView shouldHighlightItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance requesting this information.

indexPath

The index path of the item about to be highlighted.

Return Value

YES if the item should be highlighted.

Declared In

TKListView.h

listView:shouldLoadMoreDataAtIndexPath:

Returns a boolean value indicating whether more data will be loaded. Called after the user requested loading more data on demand by scrolling over the cellBuffer limit size.

- (BOOL)listView:(TKListView *__nonnull)listView shouldLoadMoreDataAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

indexPath

The index path where the buffer limit size was reached.

Declared In

TKListView.h

listView:shouldSelectItemAtIndexPath:

Returns a boolean value indicating whether the specified item should be selected.

- (BOOL)listView:(TKListView *__nonnull)listView shouldSelectItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance requesting this information.

indexPath

The index path of the item about to be selected.

Return Value

YES if the item should be selected.

Declared In

TKListView.h

listView:shouldSwipeCell:atIndexPath:

This method is called when the user starts swiping a cell.

- (BOOL)listView:(TKListView *__nonnull)listView shouldSwipeCell:(TKListViewCell *__nonnull)cell atIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

cell

The TKListViewCell instance being swiped.

indexPath

The index path of the cell being swiped.

Declared In

TKListView.h

listView:willReorderItemAtIndexPath:

This method is called when list view is about to reorder an item.

- (BOOL)listView:(TKListView *__nonnull)listView willReorderItemAtIndexPath:(NSIndexPath *__nonnull)indexPath

Parameters

listView

The TKListView instance.

indexPath

The index path of the item.

Return Value

YES if the item can be reordered, otherwise NO

Declared In

TKListView.h

listViewShouldRefreshOnPull:

Returns a boolean value indicating whether listView should display activity indicator and wait for fresh data. Called after user performs pull-to-refresh gesture.

- (BOOL)listViewShouldRefreshOnPull:(TKListView *__nonnull)listView

Parameters

listView

The listview component instance requesting the fresh data.

Declared In

TKListView.h