UITableView editing mode - color adjustment of the minus delete button

Is there a way to adjust the color of the minus delete button when the UITableView is in edit mode? The designer needs to be more red to match our application color scheme. Please note that I'm talking about the minus sign of the minus sign on the left, and not about the delete confirmation buttons on the right:

enter image description here

The SO messages I found, such as this one , are about setting up the delete confirmation buttons on the right side.

+4
source share
1 answer

, cellForRowAtIndexPath:

+(void) setImageToDeleteBtnInCell:(UITableViewCell*) cell image:(UIImage*) image{
for (UIView *subv in cell.subviews){
    if ([NSStringFromClass([subv class]) isEqualToString:@"UITableViewCellEditControl"]) {
        int i = 0;
        for (UIView *imgV in subv.subviews){
            if (i == 1){
                if([imgV isKindOfClass:[UIImageView class]]){

                    ((UIImageView*) imgV).image = image;
                    //imgV.tintColor = [ObjcThemeConnector getMainColor];
                }
            }
            i++;
        }
    }
}}
0

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


All Articles