gpt4 book ai didi

ios - 通过点击 iOS 中的红色减号图标删除 tableview 单元格

转载 作者:行者123 更新时间:2023-11-29 01:17:27 25 4
gpt4 key购买 nike

我想立即删除 tableview 单元格,而无需在用户单击红色减号图标时确认按下红色“删除”按钮。步骤 1. 点击编辑按钮 > 出现红色减号图标 > 点击减号图标 >> 删除行而不显示红色“删除”图标。

最佳答案

这会完成您想要的工作。

- (nullable NSString *)tableView:(UITableView *)tableViews titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath 
{
[arrOutputRecords removeObjectAtIndex:indexPath.row];

[tableViews deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]
withRowAnimation:YES];

[_tableView reloadData];

return @"";
}

关于ios - 通过点击 iOS 中的红色减号图标删除 tableview 单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34988864/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com