UITableViewCellAccessoryCheckmark not showing in iOS 7

I have a problem with a Checkmark accessory in my cell. When I use something of a different type of accessory, it works, but not with the Checkmark accessory.

It works great on 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; } 
+6
source share
4 answers

I solved these problems by changing the color of the hues of the uitableview

I changed the tintcolot ofitable from InterfaceBuilder to the default color

or

 TableView.tintColor = [UIColor blackColor]; 
+22
source

In case this can help someone ... for me setting the color of the shades of the table did not work, but setting the color of the shades of the cell in cellForRowAtIndexPath really worked:

 cell.tintColor = [UIColor grayColor]; 
+2
source

Just like a reality check, since your code looks fine, you can change your [event.current boolValue] to YES, it seems that the problem really matters ... I will also check the table delegate.

If not this or that, let us know ... I will delete this answer ...

 if (YES) { //.. } 
+1
source

To get the blue checkmark back (similar to iOS6), you can use:

 cell.tintColor = [UIColor colorWithRed:(0.0/255.0) green:(122.0/255.0) blue:(255.0/255.0) alpha:1.0]; 
+1
source

Source: https://habr.com/ru/post/955499/


All Articles