Conforms to NSObject
Declared in VPPDropDownDelegate.h

Overview

This protocol defines a set of methods to notify the delegate when:

  • any dropdown child has been selected.
  • dropdown needs delegate cell customization.
  • dropdown needs row’s height.

Tasks

Instance Methods

dropDown:cellForElement:atGlobalIndexPath:

This method is called when the dropdown needs an element cell.

- (UITableViewCell *)dropDown:(VPPDropDown *)dropDown cellForElement:(VPPDropDownElement *)element atGlobalIndexPath:(NSIndexPath *)globalIndexPath

Parameters

dropDown

the involved dropdown.

element

the involved element.

globalIndexPath

the tableView’s involved indexPath.

Return Value

the customized cell. You can return nil if you don’t want to customize it. In that case, the dropdown will automatically do it for you.

Declared In

VPPDropDownDelegate.h

dropDown:elementSelected:atGlobalIndexPath:

This method is called when any dropdown child is selected. This method is mandatory.

- (void)dropDown:(VPPDropDown *)dropDown elementSelected:(VPPDropDownElement *)element atGlobalIndexPath:(NSIndexPath *)globalIndexPath

Parameters

dropDown

the involved dropdown.

element

the involved element.

globalIndexPath

the tableView’s selected indexPath.

Declared In

VPPDropDownDelegate.h

dropDown:heightForElement:atIndexPath:

This method is called when the dropdown is asked about the row’s height.

- (CGFloat)dropDown:(VPPDropDown *)dropDown heightForElement:(VPPDropDownElement *)element atIndexPath:(NSIndexPath *)indexPath

Parameters

dropDown

the involved dropdown.

element

the involved element.

indexPath

the tableView’s involved indexPath.

Return Value

the row’s height.

If you do not implement this method, dropDown tableView’s rowHeight property will be returned instead.

Declared In

VPPDropDownDelegate.h

dropDown:rootCellAtGlobalIndexPath:

This method is called when the dropdown needs the root cell.

- (UITableViewCell *)dropDown:(VPPDropDown *)dropDown rootCellAtGlobalIndexPath:(NSIndexPath *)globalIndexPath

Parameters

dropDown

the involved dropdown.

globalIndexPath

the tableView’s involved indexPath.

Return Value

the customized cell. You can return nil if you don’t want to customize it. In that case, the dropdown will automatically do it for you.

Declared In

VPPDropDownDelegate.h