Skip to content

Instantly share code, notes, and snippets.

@tonysherbondy
Created March 21, 2014 03:31
Show Gist options
  • Save tonysherbondy/9678982 to your computer and use it in GitHub Desktop.
Save tonysherbondy/9678982 to your computer and use it in GitHub Desktop.
How I'm instantiating my prototype cell and causing an infinite loop
-(ResultTableViewCell *)prototypeResultCell
{
// lazily instantiate and hold onto the prototype
if (!_prototypeResultCell) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
_prototypeResultCell = [self.tableView dequeueReusableCellWithIdentifier:@"ResultTableViewCell" forIndexPath:indexPath];
}
return _prototypeResultCell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment