Swift 从弹出窗口中删除 tableViewCell

Swift delete tableViewCell from popUp

我在 tableview 单元格中有一个按钮,可以带来警报视图。此 alertView 可以选择删除该单元格。除了编辑或滑动选项之外,我找不到从其他位置删除单元格的任何内容。请问有什么建议吗?

我猜你也想为这个过程制作动画。

  self.data.removeAtIndex(indexPath.row)
  self.tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Fade)

您首先需要从用于 tableView 的数组中删除该单元格的数据。然后您可以删除特定 NSIndexPath 上的一行。