Skip to content

Instantly share code, notes, and snippets.

@etolstoy
Created February 17, 2015 18:21
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 etolstoy/faba57a7172292f47916 to your computer and use it in GitHub Desktop.
Save etolstoy/faba57a7172292f47916 to your computer and use it in GitHub Desktop.
IDTMessaging Test
// 3. As a part of a ToDo -list application, write the implementation for method tableView:cellForRowAtIndexPath: constructing a UITableViewCell with a text label and disclosure indicator
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier forIndexPath:indexPath];
cell = [self configureCell:cell atIndexPath:indexPath];
return cell;
}
- (UITableViewCell *)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath {
NSString *currentItem = [self.itemsArray objectAtIndex:indexPath.row];
[cell.textLabel setText:currentItem];
[cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment