Nimbus
0.9.3 - Nimbus is proudly hosted on Github
An iOS framework whose growth is bounded by O(documentation).
|
A general-purpose cell for displaying text.
When given a NITitleCellObject, will set the textLabel's text with the title. When given a NISubtitleCellObject, will also set the detailTextLabel's text with the subtitle.
Definition at line 64 of file NICellCatalog.h.
Methods | |
(BOOL) | - shouldUpdateCellWithObject: |
(CGFloat) | + heightForObject:atIndexPath:tableView: |
- (BOOL) shouldUpdateCellWithObject: | (id) | object | [required, inherited] |
Called when a cell is created and reused.
Implement this method to customize the cell's properties for display using the given object.
+ (CGFloat) heightForObject: | (id) | object | |
atIndexPath: | (NSIndexPath *) | indexPath | |
tableView: | (UITableView *) | tableView | |
[static, optional, inherited] |
Should be used in tableView:heightForRowAtIndexPath: to calculate dynamic cell heights.
The following is an appropiate implementation in your tableView's delegate:
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { CGFloat height = tableView.rowHeight; id object = [(NITableViewModel *)tableView.dataSource objectAtIndexPath:indexPath]; id class = [object cellClass]; if ([class respondsToSelector:@selector(heightForObject:atIndexPath:tableView:)]) { height = [class heightForObject:object atIndexPath:indexPath tableView:tableView]; } return height; }