NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
A protocol for NIMutableTableViewModel to handle editing states for objects.
Tasks | |
(BOOL) | - tableViewModel:canEditObject:atIndexPath:inTableView: |
(BOOL) | - tableViewModel:canMoveObject:atIndexPath:inTableView: |
(BOOL) | - tableViewModel:shouldMoveObject:atIndexPath:toIndexPath:inTableView: |
(UITableViewRowAnimation) | - tableViewModel:deleteRowAnimationForObject:atIndexPath:inTableView: |
(BOOL) | - tableViewModel:shouldDeleteObject:atIndexPath:inTableView: |
(UITableViewCell *) | - tableViewModel:cellForTableView:atIndexPath:withObject: |
Asks the receiver whether the object at the given index path should be editable.
If this method is not implemented, the default response is assumed to be NO.
Asks the receiver whether the object at the given index path should be moveable.
If this method is not implemented, the default response is assumed to be NO.
Asks the receiver whether the given object should be moved.
If this method is not implemented, the default response is assumed to be YES.
Returning NO will stop the model from handling the move logic.
Asks the receiver what animation should be used when deleting the object at the given index path.
If this method is not implemented, the default response is assumed to be UITableViewRowAnimationAutomatic.
Asks the receiver whether the given object should be deleted.
If this method is not implemented, the default response is assumed to be YES.
Returning NO will stop the model from handling the deletion logic. This is a good opportunity for you to show a UIAlertView or similar feedback prompt to the user before initiating the deletion yourself.
If you implement the deletion of the object yourself, your code may resemble the following:
Fetches a table view cell at a given index path with a given object.
The implementation of this method will generally use object to customize the cell.
Reimplemented in NICellFactory.