How to do custom font and color in UITableViewRowAction without Storyboard

前端 未结 9 1685
失恋的感觉
失恋的感觉 2020-12-30 08:09

I have classic TableView where you can delete item if you swipe and than clicking on the button. I know how to set custom background on the cell, but I can\'t find how I can

9条回答
  •  时光说笑
    2020-12-30 09:08

    This seems to work, at least for setting the font color:

    - (void)setupRowActionStyleForTableViewSwipes {
        UIButton *appearanceButton = [UIButton appearanceWhenContainedInInstancesOfClasses:@[[NSClassFromString(@"UITableViewCellDeleteConfirmationView") class]]];
        [appearanceButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
    }
    

提交回复
热议问题