
正文
iOS tableView自定义删除按钮
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
// 自定义左滑显示编辑按钮- (NSArray<UITableViewRowAction*>*)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewRowAction *rowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@" 删除 " handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) { NSLog(@"删除"); }]; rowAction.backgroundColor = [UIColor yellowColor]; NSArray *arr = @[rowAction]; return arr;}







