Вид конструкции из xib, как показано ниже
![alt text](https://i.stack.imgur.com/U4QP5.png)
теперь создайте IBOutlet из uiview в файле .h
IBOutlet UIView *accessoryView;
подключите этот IBOutlet к вашему представлению дизайна.
теперь в файле .m установите это представление как editAccessoryView ячейки таблицы
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
cell.editingAccessoryView = accessoryView;
}
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}
теперь, когда вы проводите пальцем, вместо кнопки удаления будет отображаться ваш пользовательский вид