Couchbase Lite
Objective-C API for iOS and Mac OS
Instance Methods | List of all members
<CBLUITableDelegate> Protocol Reference

Additional methods for the table view's delegate, that will be invoked by the CBLUITableSource. More...

#import <CBLUITableSource.h>

Inheritance diagram for <CBLUITableDelegate>:

Instance Methods

(UITableViewCell *) - couchTableSource:cellForRowAtIndexPath:
 Allows delegate to return its own custom cell, just like -tableView:cellForRowAtIndexPath:. More...
 
(void) - couchTableSource:willUpdateFromQuery:
 Called after the query's results change, before the table view is reloaded. More...
 
(void) - couchTableSource:updateFromQuery:previousRows:
 Called after the query's results change to update the table view. More...
 
(void) - couchTableSource:willUseCell:forRow:
 Called from -tableView:cellForRowAtIndexPath: just before it returns, giving the delegate a chance to customize the new cell. More...
 
(bool) - couchTableSource:deleteRow:
 Called when the user wants to delete a row. More...
 
(void) - couchTableSource:deleteFailed:
 Called upon failure of a document deletion triggered by the user deleting a row. More...
 

Detailed Description

Additional methods for the table view's delegate, that will be invoked by the CBLUITableSource.

Method Documentation

- (UITableViewCell *) couchTableSource: (CBLUITableSource *)  source
cellForRowAtIndexPath: (NSIndexPath *)  indexPath 
optional

Allows delegate to return its own custom cell, just like -tableView:cellForRowAtIndexPath:.

If this returns nil the table source will create its own cell, as if this method were not implemented.

- (void) couchTableSource: (CBLUITableSource *)  source
willUpdateFromQuery: (CBLLiveQuery *)  query 
optional

Called after the query's results change, before the table view is reloaded.

- (void) couchTableSource: (CBLUITableSource *)  source
updateFromQuery: (CBLLiveQuery *)  query
previousRows: (NSArray *)  previousRows 
optional

Called after the query's results change to update the table view.

If this method is not implemented by the delegate, reloadData is called on the table view.

- (void) couchTableSource: (CBLUITableSource *)  source
willUseCell: (UITableViewCell *)  cell
forRow: (CBLQueryRow *)  row 
optional

Called from -tableView:cellForRowAtIndexPath: just before it returns, giving the delegate a chance to customize the new cell.

- (bool) couchTableSource: (CBLUITableSource *)  source
deleteRow: (CBLQueryRow *)  row 
optional

Called when the user wants to delete a row.

If the delegate implements this method, it will be called instead of the default behavior of deleting the associated document.

Parameters
sourceThe CBLUITableSource
rowThe query row corresponding to the row to delete
Returns
True if the row was deleted, false if not.
- (void) couchTableSource: (CBLUITableSource *)  source
deleteFailed: (NSError *)  error 
optional

Called upon failure of a document deletion triggered by the user deleting a row.


The documentation for this protocol was generated from the following file: