Conforms to NSObject
Declared in RATreeView.h

Overview

The data source of the RATreeView object must conform to RATreeVIewDataSource protocol. It is implemented by an object with metdiates the application’s data model for RATreeView object.

Tasks

Instance Methods

treeView:canEditRowForItem:

- (BOOL)treeView:(RATreeView *)treeView canEditRowForItem:(id)item
Discussion

Asks the data source to verify that row for given item is editable.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a cell in tree view.

Return Value

YES if the row indicated by indexPath is editable; otherwise, NO.

Declared In

RATreeView.h

treeView:cellForItem:

- (UITableViewCell *)treeView:(RATreeView *)treeView cellForItem:(id)item
Discussion

Asks the data source for a cell to insert for a specified item. (required)

Parameters

treeView

A tree-view object requesting the cell.

item

An item identifying a cell in tree view.

Return Value

An object inheriting from UITableViewCell that the tree view can use for the specified row. An assertion is raised if you return nil.

Declared In

RATreeView.h

treeView:child:ofItem:

- (id)treeView:(RATreeView *)treeView child:(NSInteger)index ofItem:(id)item
Discussion

Ask the data source to return the child item at the specified index of a given item. (required)

Parameters

treeView

The tree-view object requesting child of the item at the specified index.

index

The index of the child item from item to return.

item

An item identifying a cell in tree view.

Return Value

The child item at index of a item. If item is nil, returns the appropriate child item of the root object.

Declared In

RATreeView.h

treeView:commitEditingStyle:forRowForItem:

- (void)treeView:(RATreeView *)treeView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowForItem:(id)item
Discussion

Asks the data source to commit the insertion or deletion of a row for specified item in the receiver.

Parameters

treeView

The tree-view object requesting the insertion or deletion.

editingStyle

The cell editing style corresponding to a insertion or deletion requested for the row specified by item. Possible editing styles are UITableViewCellEditingStyleInsert or UITableViewCellEditingStyleDelete.

item

An item identifying a cell in tree view.

treeNodeInfo

Object including additional information about item.

Declared In

RATreeView.h

treeView:numberOfChildrenOfItem:

- (NSInteger)treeView:(RATreeView *)treeView numberOfChildrenOfItem:(id)item
Discussion

Ask the data source to return the number of child items encompassed by a given item. (required)

Parameters

treeView

The tree-view that sent the message.

item

An item identifying a cell in tree view.

treeNodeInfo

Object including additional information about item.

Return Value

The number of child items encompassed by item. If item is nil, this method should return the number of children for the top-level item.

Declared In

RATreeView.h