Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- NewCell *cell = (NewCell *)[tableView dequeueReusableCellWithIdentifier:@"Cell"];
- if (cell == nil) {
- cell = [[[NewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"] autorelease];
- cell.selectionStyle = UITableViewCellSelectionStyleBlue;
- cell.textLabel.textColor = [UIColor blueColor];
- }
- // Customize cell
- switch (indexPath.section) {
- case 0: {
- cell.textLabel.text = @"0";
- } break;
- case 1: {
- cell.textLabel.text = @"1";
- } break;
- case 2: {
- //This section has 3 rows.
- NSLog(@"ROW: %d",indexPath.row);
- cell.textLabel.text = @"2";
- } break;
- default: break;
- }
- return cell;
- }
Add Comment
Please, Sign In to add comment