- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return UITableViewCellEditingStyleDelete | UITableViewCellEditingStyleInsert;
}


关于如何取得所选择的行,两个办法

1)通过delegate方法didselect和diddeselect来获取记录
2)通过运行时拿到UITableView的私有成员变量_selectedIndexPaths来获取

用第二种不会被封,但属于进阶用法,不建议新手使用。

相关文章:

  • 2021-11-18
  • 2021-11-15
  • 2021-08-08
  • 2022-02-01
  • 2022-01-08
  • 2022-12-23
  • 2021-11-26
  • 2021-10-22
猜你喜欢
  • 2022-02-27
  • 2021-09-15
  • 2022-01-28
  • 2021-09-13
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案