NimbusKit
1.2.1 - Fork Nimbus on Github - Visit the Nimbus Wiki
The iOS framework that grows only as fast as its documentation
|
A non-mutable table view model that complies to the UITableViewDataSource protocol.
This model allows you to easily create a data source for a UITableView without having to implement the UITableViewDataSource methods in your UITableViewController.
This base class is non-mutable, much like an NSArray. You must initialize this model with the contents when you create it.
Tasks | |
Configuration | |
NITableViewModelSectionIndex | sectionIndexType property |
BOOL | sectionIndexShowsSearch property |
BOOL | sectionIndexShowsSummary property |
(void) | - setSectionIndexType:showsSearch:showsSummary: |
Creating Table View Cells | |
id< NITableViewModelDelegate > | delegate property |
NITableViewModelCellForIndexPathBlock | createCellBlock property |
Creating Table View Models | |
(id) | - initWithDelegate: |
(id) | - initWithListArray:delegate: |
(id) | - initWithSectionedArray:delegate: |
Accessing Objects | |
(id) | - objectAtIndexPath: |
(NSIndexPath *) | - indexPathForObject: |
The section index type.
You will likely use NITableViewModelSectionIndexAlphabetical in practice.
NITableViewModelSectionIndexNone by default.
Whether or not the search symbol will be shown in the section index.
NO by default.
Whether or not the summary symbol will be shown in the section index.
NO by default.
A delegate used to fetch table view cells for the data source.
A block used to create a UITableViewCell for a given object.
Initializes a newly allocated static model with the given delegate and empty contents.
This method can be used to create an empty model.
Initializes a newly allocated static model with the contents of a list array.
A list array is a one-dimensional array that defines a flat list of rows. There will be no sectioning of contents in any way.
Initializes a newly allocated static model with the contents of a sectioned array.
A sectioned array is a one-dimensional array that defines a list of sections and each section's contents. Each NSString begins a new section and any other object defines a row for the current section.
Returns the object at the given index path.
If no object exists at the given index path (an invalid index path, for example) then nil will be returned.
Returns the index path of the given object within the model.
If the model does not contain the object then nil will be returned.
Configures the model's section index properties.
Calling this method will compile the section index depending on the index type chosen.
sectionIndexType | The type of section index to display. |
showsSearch | Whether or not to show the search icon at the top of the index. |
showsSummary | Whether or not to show the summary icon at the bottom of the index. |