20 Feb 2011, 12:29
Generic-user-small

durul (2 posts)

hi bil, I have taken double error message on my kod. I update ios3.

How can I update this row.

?
       cell.hidesAccessoryWhenEditing = NO;  ?

- (void)tableView:(UITableView *)tv commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if(editingStyle == UITableViewCellEditingStyleDelete && indexPath.row < [self.ingredients count]) {

}
}

- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:@”ingredientsCell”]; if(nil == cell) { cell = [[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:nil]; } if(indexPath.row < self.ingredients.count) { cell.textLabel.text = [self.ingredients objectAtIndex:indexPath.row]; } else { cell.textLabel.text = @”Add new ingredient”; cell.textLabel.textColor = [UIColor lightGrayColor]; cell.hidesAccessoryWhenEditing = NO; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } return cell;
}

  You must be logged in to comment