Skip to content

Instantly share code, notes, and snippets.

@rodericj
Created February 10, 2014 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodericj/8925814 to your computer and use it in GitHub Desktop.
Save rodericj/8925814 to your computer and use it in GitHub Desktop.
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 1) {
static JotoTutorialTagsTableViewCell *sizingCell;
if (!sizingCell) {
sizingCell = [tableView dequeueReusableCellWithIdentifier:@"tutorialTagsCell"];
}
CGRect frame = sizingCell.frame;
frame.size.width = self.tableView.frame.size.width;
sizingCell.frame = frame;
NSString *category = [self.interestArray objectAtIndex:indexPath.section];
NSArray *tags = [self tagsForCategory:category];
[sizingCell setTags:tags];
[sizingCell layoutSubviews];
CGFloat height = [sizingCell heightForTagsView];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment