UITableViewCell Править - PullRequest
       4

UITableViewCell Править

0 голосов
/ 23 ноября 2011

Я добавил этот код в Rootcontroller моего приложения

По какой-то причине метод editStyleForRowAtIndexPath вызывается три раза, когда я проводлю строку ... Я не добавил никакого другого кода только эти 2 метода

- (UITableViewCellEditingStyle) tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"Iam being called %d", indexPath.row);
    return UITableViewCellEditingStyleDelete;

}

// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        //add code here for when you hit delete
    }    
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...