Organic
Organic copied to clipboard
Move logic from tableView to Section
This allows to create custom smart OrganicSections, for example DynamicHeightReuseOrganicSection:
- (CGFloat)cellHeightForRow:(NSInteger)row inTableView:(UITableView *)tableView
{
if (self.reuseEnabled) {
OrganicCell *cell = [self cellForRow:row inTableView:tableView];
[cell layoutIfNeeded];
return cell.height;
}
else {
[super cellHeightForRow:row inTableView:tableView];
}
}