Skip to content

Instantly share code, notes, and snippets.

@blork
Created September 30, 2013 14:03
Show Gist options
  • Select an option

  • Save blork/6764296 to your computer and use it in GitHub Desktop.

Select an option

Save blork/6764296 to your computer and use it in GitHub Desktop.
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([cell.accessoryView isKindOfClass:[UITextField class]] && CGRectIsEmpty(cell.accessoryView.frame)) {
cell.accessoryView.frame = CGRectMake(cell.accessoryView.bounds.origin.x, cell.accessoryView.bounds.origin.y, CGRectGetWidth(cell.frame) / 2, CGRectGetHeight(cell.frame));
cell.accessoryView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin;
} else {
//[cell.accessoryView sizeToFit];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment