您的位置:首页 > 移动开发 > IOS开发

iOS tableView自定义删除按钮

2017-02-14 14:52 519 查看
// 自定义左滑显示编辑按钮

- (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;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐