ASTableViewDelegate Protocol Reference

Conforms to ASCommonTableViewDelegate
NSObject
Declared in ASTableView.h

Overview

This is a node-based UITableViewDelegate.

Note that -tableView:heightForRowAtIndexPath: has been removed; instead, your custom ASCellNode subclasses are responsible for deciding their preferred onscreen height in -calculateSizeThatFits:.

– tableView:willBeginBatchFetchWithContext:

Receive a message that the tableView is near the end of its data set and more data should be fetched if necessary.

- (void)tableView:(ASTableView *)tableView willBeginBatchFetchWithContext:(ASBatchContext *)context

Parameters

tableView

The sender.

context

A context object that must be notified when the batch fetch is completed.

Discussion

You must eventually call -completeBatchFetching: with an argument of YES in order to receive future notifications to do batch fetches. This method is called on a background queue.

ASTableView currently only supports batch events for tail loads. If you require a head load, consider implementing a UIRefreshControl.

Declared In

ASTableView.h

– shouldBatchFetchForTableView:

Tell the tableView if batch fetching should begin.

- (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView

Parameters

tableView

The sender.

Discussion

Use this method to conditionally fetch batches. Example use cases are: limiting the total number of objects that can be fetched or no network connection.

If not implemented, the tableView assumes that it should notify its asyncDelegate when batch fetching should occur.

Declared In

ASTableView.h