Skip to content

Instantly share code, notes, and snippets.

@sgoodwin
Created November 19, 2012 19:28
Show Gist options
  • Save sgoodwin/4113105 to your computer and use it in GitHub Desktop.
Save sgoodwin/4113105 to your computer and use it in GitHub Desktop.
Moving the junk into it's own method at least.
typedef enum {
RWSSectionInfo,
RWSSectionDynamic,
RWSSectionCount
}RWSSection;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
RWSSection section = indexPath.section;
switch(section){
case RWSSectionInfo:
return [self infoCellForRow:indexPath.row];
break;
case RWSSectionDynamic:
return [self dynamicCellForRow:indexPath.row];
break;
case RWSSectionCount:
NSAssert(NO, @"This should never happen!");
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment