#import <EMInfiniteScrollView.h>
Inherits <EMPageableDataSourceDelegate>.
Inherited by EMSearchInfiniteScrollView.
Public Member Functions | |
(void) | - reloadData |
(id) | - initWithDataSource:maxItems: |
(UITableViewCell *) | - tableView:cellForRowAtIndexPath:withObject: |
(UITableViewCell *) | - tableView:loadingCellForRowAtIndexPath: |
(NSInteger) | - numberOfHeaderRowsForTableView: |
(UITableViewCell *) | - tableView:headerCellForRowAtIndexPath:withObject: |
(UIViewController *) | - detailControllerForObject: |
Static Public Member Functions | |
(id) | + viewWithDataSource:maxItems: |
Protected Attributes | |
UITableView * | _tableView |
NSInteger | _maxItems |
NSInteger | _pageSize |
NSInteger | _preloadOffset |
NSError * | _error |
id< EMPageableDataSource > | _dataSource |
EMSearchController * | _controller |
Properties | |
id< EMPageableDataSource > | dataSource |
EMSearchController * | controller |
UITableView * | tableView |
NSInteger | maxItems |
NSInteger | pageSize |
NSInteger | preloadOffset |
The EMInfiniteScrollView contains a UITableView and is powered off of an EMPageableDataSource.
- (UIViewController *) detailControllerForObject: | (id) | object |
If the subclass does not implement this or returns nil, The infinite scroll view does not do anything when a cell is selected. Otherwise, it pushes this controller onto the stack.
- (void) reloadData |
Call this instead of [self.tableView reloadData];
- (UITableViewCell *) tableView: | (UITableView *) | tableView | |
cellForRowAtIndexPath: | (NSIndexPath *) | indexPath | |
withObject: | (id) | object | |
To be overridden by subclasses
- (UITableViewCell *) tableView: | (UITableView *) | tableView | |
loadingCellForRowAtIndexPath: | (NSIndexPath *) | indexPath | |
Reasonable default
- (NSInteger) maxItems [read, write, assign] |
Can be used to limit the number of items, even if the datasource contains more than the maxItems
- (NSInteger) pageSize [read, write, assign] |
This sets the number of objects to load at a time. Defaults to 10. However, the first page of records is loaded by object source, so the first page of results is configured elsewhere
- (NSInteger) preloadOffset [read, write, assign] |
The infinite scroller will start loading the next page at when the table view loads the cell at this offset from the last cell. Defaults to 0.