Я пытаюсь настроить UITableView, который я могу редактировать. У меня реализованы следующие методы:
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
но я не уверен, как связать редактирование с кнопкой редактирования в моей UINavigationBar. Вот мой пункт кнопки:
UIBarButtonItem * leftButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit"
style:UIBarButtonSystemItemEdit
target:nil
action:@selector(editButtonSelected:)];
Как мне заставить это работать?