Skip to content

Instantly share code, notes, and snippets.

@jchudzynski
Created February 4, 2014 19:50
Show Gist options
  • Select an option

  • Save jchudzynski/8810990 to your computer and use it in GitHub Desktop.

Select an option

Save jchudzynski/8810990 to your computer and use it in GitHub Desktop.
UITableViewDataSource
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyReuseIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier];
}
// format the cell
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment