Guest User

Untitled

a guest
Dec 9th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  2. NewCell *cell = (NewCell *)[tableView dequeueReusableCellWithIdentifier:@"Cell"];
  3. if (cell == nil) {
  4. cell = [[[NewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"] autorelease];
  5. cell.selectionStyle = UITableViewCellSelectionStyleBlue;
  6. cell.textLabel.textColor = [UIColor blueColor];
  7. }
  8. // Customize cell
  9. switch (indexPath.section) {
  10. case 0: {
  11. cell.textLabel.text = @"0";
  12. } break;
  13. case 1: {
  14. cell.textLabel.text = @"1";
  15. } break;
  16. case 2: {
  17. //This section has 3 rows.
  18. NSLog(@"ROW: %d",indexPath.row);
  19. cell.textLabel.text = @"2";
  20. } break;
  21. default: break;
  22. }
  23. return cell;
  24. }
Add Comment
Please, Sign In to add comment