Couchbase Lite
Objective-C API for iOS and Mac OS
<CBLUITableDelegate > Protocol Reference

Detailed Description

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

Inheritance diagram for <CBLUITableDelegate >:

Instance Methods

(void) - couchTableSource:willUseCell:forRow:
 Called from -tableView:cellForRowAtIndexPath: just before it returns, giving the delegate a chance to customize the new cell. More...
 
(nullable UITableViewCell *) - couchTableSource:cellForRowAtIndexPath:
 Allows delegate to create 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...
 
(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...
 

Method Documentation

◆ couchTableSource:willUseCell:forRow:()

- (void CBLUITableDelegate) 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.

◆ couchTableSource:cellForRowAtIndexPath:()

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

Allows delegate to create 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.

◆ couchTableSource:willUpdateFromQuery:()

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

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

◆ couchTableSource:updateFromQuery:previousRows:()

- (void CBLUITableDelegate) couchTableSource: (CBLUITableSource *)  source
updateFromQuery: (CBLLiveQuery *)  query
previousRows: (CBLArrayOf(CBLQueryRow *) *)  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.

◆ couchTableSource:deleteRow:()

- (bool CBLUITableDelegate) 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.

◆ couchTableSource:deleteFailed:()

- (void CBLUITableDelegate) 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: