daily pastebin goal
74%
SHARE
TWEET

Untitled

a guest Dec 9th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top