NITableViewModel and NITableViewActions cooperate to solve two related tasks: data representation and user actions, respectively. A NITableViewModel is composed of objects and NITableViewActions maintains a mapping of actions to these objects. The object's attached actions are executed when the user interacts with the cell representing an object.
NITableViewActions will apply the correct accessoryType and selectionStyle values to the cell when the cell is displayed using a mechanism known as delegate chaining. This effect is achieved by invoking forwardingTo: on the NITableViewActions instance and providing the appropriate object to forward to (generally
The dataSource property of the table view must be an instance of NITableViewModel.
|(id< UITableViewDelegate >)||- forwardingTo:|
Creating Table View Actions
The cell selection style that will be applied to the cell when it is displayed using delegate forwarding.
By default this is UITableViewCellSelectionStyleBlue.
Sets the delegate that table view methods should be forwarded to.
This method allows you to insert the actions into the call chain for the table view's delegate methods.
|forwardDelegate||The delegate to forward invocations to.|
Removes the delegate from the forwarding chain.
If a forwared delegate is about to be released but this object may live on, you must remove the forwarding in order to avoid invalid access errors at runtime.
|forwardDelegate||The delegate to stop forwarding invocations to.|
Returns the accessory type this actions object will apply to a cell for the given object when it is displayed.
|object||The object to determine the accessory type for.|
Returns the cell selection style this actions object will apply to a cell for the given object when it is displayed.
|object||The object to determine the selection style for.|