Conforms to NSObject
UIScrollViewDelegate
Declared in RATreeView.h

Overview

The delegate of a RATreeView object must adopt the RATreeViewDelegate protocol. Optional methods of the protocol allow the delegate to manage selections, help to delete and reorder cells, and perform other actions.

Tasks

Other Methods

Managing Accessory Views

Expanding and Collapsing Tree View rows

Managing Selections

Editing Tree Rows

Tracking the Removal of Views

Copying and Pasting Row Content

Managing Tree View Highlighting

Instance Methods

treeView:accessoryButtonTappedForRowForItem:

- (void)treeView:(RATreeView *)treeView accessoryButtonTappedForRowForItem:(id)item
Discussion

Tells the delegate that the user tapped the accessory (disclosure) view associated with a row for a given item.

Parameters

treeView

The tree-view object informing the delegate of this event.

item

An item identifying a cell in tree view.

Declared In

RATreeView.h

treeView:canPerformAction:forRowForItem:withSender:

- (BOOL)treeView:(RATreeView *)treeView canPerformAction:(SEL)action forRowForItem:(id)item withSender:(id)sender
Discussion

Asks the delegate if the editing menu should omit the Copy or Paste command for a row for a specified item.

Parameters

treeView

The tree-view object that is making this request.

action

A selector type identifying the copy: or paste: method of the UIResponderStandardEditActions informal protocol.

item

An item identifying a row in tree view.

sender

The object that initially sent the copy: or paste: message.

Return Value

YES if the command corresponding to action should appear in the editing menu, otherwise NO. The default value is NO.

Declared In

RATreeView.h

treeView:didCollapseRowForItem:

- (void)treeView:(RATreeView *)treeView didCollapseRowForItem:(id)item
Discussion

Tells the delegate that the row for a specified item is now collapsed.

Parameters

treeView

A tree-view object informing the delegate that new row is collapsed.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:didDeselectRowForItem:

- (void)treeView:(RATreeView *)treeView didDeselectRowForItem:(id)item
Discussion

Tells the delegate that the row for a specified item is now deselected.

Parameters

treeView

A tree-view object informing the delegate about the row deselection.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:didEndDisplayingCell:forItem:

- (void)treeView:(RATreeView *)treeView didEndDisplayingCell:(UITableViewCell *)cell forItem:(id)item
Discussion

Tells the delegate that the cell for a specified item was removed from the tree.

Parameters

treeView

The tree-view object that removed the view.

cell

The cell that was removed.

item

An item identifying a cell in tree view.

Declared In

RATreeView.h

treeView:didEndEditingRowForItem:

- (void)treeView:(RATreeView *)treeView didEndEditingRowForItem:(id)item
Discussion

Tells the delegate that the tree view has left editing mode.

Parameters

treeView

The tree-view object providing this information.

item

AAn item identifying a row in tree view.

Declared In

RATreeView.h

treeView:didExpandRowForItem:

- (void)treeView:(RATreeView *)treeView didExpandRowForItem:(id)item
Discussion

Tells the delegate that the row for a specified item is now expanded.

Parameters

treeView

A tree-view object informing the delegate that new row is expanded.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:didHighlightRowForItem:

- (void)treeView:(RATreeView *)treeView didHighlightRowForItem:(id)item
Discussion

Tells the delegate that the row for a specified item was highlighted.

Parameters

treeView

The tree-view object that highlighted the cell.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:didSelectRowForItem:

- (void)treeView:(RATreeView *)treeView didSelectRowForItem:(id)item
Discussion

Tells the delegate that the row for a specified item is now selected.

Parameters

treeView

A tree-view object informing the delegate about the new row selection.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:didUnhighlightRowForItem:

- (void)treeView:(RATreeView *)treeView didUnhighlightRowForItem:(id)item
Discussion

Tells the delegate that the highlight was removed from the row for a specified item.

Parameters

treeView

The tree-view object that removed the highlight from the cell.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:editActionsForItem:

- (NSArray *)treeView:(RATreeView *)treeView editActionsForItem:(id)item
Discussion

Asks the data source for the edit actions for an item. This is an iOS 8 only method.

@praram treeView The tree-view object requesting this information.

Parameters

item

An item identifying a cell in the tree view.

Return Value

An NSArray of UITableViewRowAction objects to show for editing.

Declared In

RATreeView.h

treeView:editingStyleForRowForItem:

- (UITableViewCellEditingStyle)treeView:(RATreeView *)treeView editingStyleForRowForItem:(id)item
Discussion

Asks the delegate for the editing style of a row for a specified item.

This method allows the delegate to customize the editing style of the cell for specified item. If the delegate does not implement this method and the UITableViewCell object is editable (that is, it has its editing property set to YES), the cell has the UITableViewCellEditingStyleDelete style set for it.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a row in tree view.

Return Value

The editing style of the cell for the row identified by item.

Declared In

RATreeView.h

treeView:estimatedHeightForRowForItem:

- (CGFloat)treeView:(RATreeView *)treeView estimatedHeightForRowForItem:(id)item
Discussion

Asks the delegate for the estimated height of a row for a specified item.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a cell in tree view.

Return Value

A nonnegative floating-point value that specifies the height (in points) of the header for section.

Declared In

RATreeView.h

treeView:heightForRowForItem:

- (CGFloat)treeView:(RATreeView *)treeView heightForRowForItem:(id)item
Discussion

Asks the delegate for the height to use for a row for a specified item.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a cell in tree view.

Return Value

A nonnegative floating-point value that specifies the height (in points) that row should be.

Declared In

RATreeView.h

treeView:indentationLevelForRowForItem:

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

Asks the delegate to return the level of indentation for a row for a specified item.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a cell in tree view.

Return Value

Returns the depth of the specified row to show its hierarchical position.

Declared In

RATreeView.h

treeView:performAction:forRowForItem:withSender:

- (void)treeView:(RATreeView *)treeView performAction:(SEL)action forRowForItem:(id)item withSender:(id)sender
Discussion

Tells the delegate to perform a copy or paste operation on the content of a row for a specified item.

The tree view invokes this method for a given action if the user taps Copy or Paste in the editing menu.

Parameters

treeView

The tree-view object that is making this request.

action

A selector type identifying the copy: or paste: method of the UIResponderStandardEditActions informal protocol.

item

An item identifying a row in tree view.

sender

The object that initially sent the copy: or paste: message.

Declared In

RATreeView.h

treeView:shouldCollapaseRowForItem:

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

Asks delegate whether a row for a specified item should be collapsed.

If the delegate does not implement this method, the default is YES.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a row in tree view.

Return Value

YES if the background of the row should be expanded, otherwise NO.

Declared In

RATreeView.h

treeView:shouldExpandRowForItem:

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

Asks delegate whether a row for a specified item should be expanded.

If the delegate does not implement this method, the default is YES.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a row in tree view.

Return Value

YES if the background of the row should be expanded, otherwise NO.

Declared In

RATreeView.h

treeView:shouldHighlightRowForItem:

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

Asks the delegate if the row for a specified item should be highlighted.

Parameters

treeView

The tree-view object that is making this request.

treeNodeInfo

Object including additional information about item.

Return Value

YES if the row should be highlighted or NO if it should not.

Declared In

RATreeView.h

treeView:shouldIndentWhileEditingRowForItem:

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

Asks the delegate whether the background of the row for a specified item should be indented while the tree view is in editing mode.

If the delegate does not implement this method, the default is YES.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a row in tree view.

Return Value

YES if the background of the row should be indented, otherwise NO.

Declared In

RATreeView.h

treeView:shouldShowMenuForRowForItem:

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

Asks the delegate if the editing menu should be shown for a row for a specified item.

Parameters

treeView

The tree-view object that is making this request.

item

An item identifying a row in tree view.

Return Value

YES if the editing menu should be shown positioned near the row and pointing to it, otherwise NO. The default value is NO.

Declared In

RATreeView.h

treeView:titleForDeleteConfirmationButtonForRowForItem:

- (NSString *)treeView:(RATreeView *)treeView titleForDeleteConfirmationButtonForRowForItem:(id)item
Discussion

Changes the default title of the delete-confirmation button.

By default, the delete-confirmation button, which appears on the right side of the cell, has the title of “Delete”. The tree view displays this button when the user attempts to delete a row, either by swiping the row or tapping the red minus icon in editing mode. You can implement this method to return an alternative title, which should be localized. Default title string (“Delete”) isn’t localized.

Parameters

treeView

The tree-view object requesting this information.

item

An item identifying a row in tree view.

Return Value

A localized string to used as the title of the delete-confirmation button.

Declared In

RATreeView.h

treeView:willBeginEditingRowForItem:

- (void)treeView:(RATreeView *)treeView willBeginEditingRowForItem:(id)item
Discussion

Tells the delegate that the tree view is about to go into editing mode.

Parameters

treeView

The tree-view object providing this information.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:willCollapseRowForItem:

- (void)treeView:(RATreeView *)treeView willCollapseRowForItem:(id)item
Discussion

Tells the delegate that a row for a specified item is about to be collapsed.

Parameters

treeView

A tree-view object informing the delegate about the impending collapse.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:willDeselectRowForItem:

- (id)treeView:(RATreeView *)treeView willDeselectRowForItem:(id)item
Discussion

Tells the delegate that a row for a specified item is about to be deselected.

Parameters

treeView

A tree-view object informing the delegate about the impending deselection.

item

An item identifying a row in tree view.

Return Value

An id object that confirms or alters the deselected row. Return an id object other than item if you want another cell to be deselected. Return nil if you don’t want the row deselected.

Declared In

RATreeView.h

treeView:willDisplayCell:forItem:

- (void)treeView:(RATreeView *)treeView willDisplayCell:(UITableViewCell *)cell forItem:(id)item
Discussion

Tells the delegate the tree view is about to draw a cell for a particular item.

Parameters

treeView

The tree-view object informing the delegate of this impending event.

cell

A table-view cell object that tableView is going to use when drawing the row.

item

An item identifying a cell in tree view.

Declared In

RATreeView.h

treeView:willExpandRowForItem:

- (void)treeView:(RATreeView *)treeView willExpandRowForItem:(id)item
Discussion

Tells the delegate that a row for a specified item is about to be expanded.

Parameters

treeView

A tree-view object informing the delegate about the impending expansion.

item

An item identifying a row in tree view.

Declared In

RATreeView.h

treeView:willSelectRowForItem:

- (id)treeView:(RATreeView *)treeView willSelectRowForItem:(id)item
Discussion

Tells the delegate that a row for a specified item is about to be selected.

Parameters

treeView

A tree-view object informing the delegate about the impending selection.

item

An item identifying a row in tree view.

Return Value

An id object that confirms or alters the selected row. Return an id object other than item if you want another cell to be selected. Return nil if you don’t want the row selected.

Declared In

RATreeView.h