DisclosureIndicator не обнаруживает касания

Я использую UITableViewCellAccessoryDisclosureIndicator как accessoryType моего UITableViewCell . Согласно документации Apple, метод источника данных

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath 

должен вызываться автоматически.

Если ячейка включена и вспомогательный тип имеет тип UITableViewCellAccessoryDetailDisclosureButton, вспомогательное представление отслеживает касания и при касании отправляет объекту источника данных сообщение tableView: accessoryButtonTappedForRowWithIndexPath:.

вот мой код:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
[cell.textLabel setText:[datasource objectAtIndex:indexPath.row]];

cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

return cell;
}

Метод источника данных - это просто NSLog , но ничего не печатается ...

Я что-то упустил? (конечно, источник данных и делегат установлены правильно)

6
задан Astoria 14 September 2015 в 12:12
поделиться