Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableViewCellAccessoryCheckmark not showing in iOS 7

I'm having a problem showing the Checkmark accessory in my cell. When I use something another type of accessory it works but not with the Checkmark accessory.

It works perfectly in iOS 6 but not on iOS 7. When am I missing?

 (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;
}
like image 303
wvp Avatar asked Oct 08 '13 14:10

wvp


2 Answers

I solved this issues changing the tint color of the uitableview

I changed the tintcolot of uitable by InterfaceBuilder to Default color

or

TableView.tintColor =  [UIColor blackColor];
like image 99
Alvaro Rojas Avatar answered Oct 17 '22 09:10

Alvaro Rojas


In case this might help somebody.... for me, setting the tableview tint color did not work, but setting the cell tint color in cellForRowAtIndexPath did work:

cell.tintColor = [UIColor grayColor];
like image 30
jem Avatar answered Oct 17 '22 10:10

jem