Название говорит обо всем. Мне нужно сделать выбор UITableViewCells
возможным, когда UITableView находится в режиме редактирования. Я не думаю, что код здесь необходим, но в случае, если он:
-(void)turnEditingOn {
[self.tableView setEditing:YES animated:YES];
if (self.tableView.isEditing)
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(newItem)];
else
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(turnEditingOn)];
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(turnEditingOn)];
//the rest of the code is omitted
}
Так что мне нужно иметь возможность нажимать на ячейки, когда они находятся в режиме редактирования, так же, как приложение «Часы», когда вы редактируете сигналы тревоги.
Спасибо
EDIT
Забыл упомянуть:
-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
и
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
не вызывается в режиме редактирования