Reputation: 1207
From the below picture, I want to change the color of multiple selection buttons and the background color while selected(the blue part).
The editingStyle is defined below
-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
return UITableViewCellEditingStyleDelete|UITableViewCellEditingStyleInsert;
}
I tried to set tintColor of the tableView,the color of multiple selection buttons changed but the background color doesn't change.
Upvotes: 0
Views: 766
Reputation: 2172
You need to change the tintColor
and multipleSelectionBackgroundView
for each cell.
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
//...
cell.tintColor = UIColor.orange
let bgview = UIView()
bgview.backgroundColor = UIColor.purple
cell.multipleSelectionBackgroundView = bgview
//...
}
Upvotes: 1