У меня возникла проблема с аксессуаром Checkmark в моей камере. Когда я использую что-то другое, оно работает, но не с аксессуаром Checkmark.UITableViewCellAccessoryCheckmark не отображается в iOS 7
Он отлично работает в iOS 6, но не на iOS 7. Когда мне не хватает?
(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:EVENT_SELECTION_CELL_IDENTIFIER forIndexPath:indexPath];
Event *event = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.textLabel.text = event.name;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if ([event.current boolValue]) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
} else {
cell.accessoryType = UITableViewCellAccessoryNone;
}
return cell;
}
Они изменили значения по умолчанию в ios7. :) Ячейка имеет цвет фона по умолчанию при выборе. В iOS 7 цвет выделения больше не синий. Вместо этого используйте * UITableViewCellSelectionStyleDefault *. версия с плавающей точкой = [[[UIDevice currentDevice] systemVersion] floatValue]; if (версия> = 7.0) { cell.selectionStyle = UITableViewCellSelectionStyleDefault; } else { cell.selectionStyle = UITableViewCellSelectionStyleNone; } –
У меня такая же проблема. См. Мой вопрос здесь: http://stackoverflow.com/questions/19249389/checkmark-wont-show-in-tableviewcell-on-ios7/19418537 – audience