Mam problem pokazujący akcesoria Checkmark w mojej komórce. Gdy używam czegoś innego, to działa, ale nie z akcesorium Checkmark.UITableViewCellAccessoryCheckmark nie wyświetla się w iOS 7
Działa doskonale w systemie iOS 6, ale nie w systemie iOS 7. Kiedy mnie brakuje?
(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;
}
Zmieniono ustawienia domyślne w ios7. :) Po wybraniu komórka ma domyślny kolor tła. W systemie iOS 7 kolor selekcji nie jest już niebieski. Zamiast tego użyj * UITableViewCellSelectionStyleDefault *. wersja float = [[[UIDevice currentDevice] systemVersion] floatValue]; if (wersja> = 7.0) { cell.selectionStyle = UITableViewCellSelectionStyleDefault; } else { cell.selectionStyle = UITableViewCellSelectionStyleNone; } –
Mam ten sam problem. Zobacz moje pytanie tutaj: http://stackoverflow.com/questions/19249389/checkmark-wont-show-in-tableviewcell-on-ios-ios7/19418537 – audience