【发布时间】:2016-10-21 02:56:16
【问题描述】:
我有一个带有两个按钮的自定义表格视图单元格。如果按下任何一个,我希望表格视图删除该行。我已经知道代码:
myArray.removeAtIndex(indexPath.row)
tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
我只是想从我的自定义单元格中调用它。我是这样设置的:
@IBAction func handleDecline(sender: AnyObject)
{
// Remove table view row
}
@IBAction func handleApprove(sender: AnyObject)
{
// Remove table view row
}
我该怎么做呢?
【问题讨论】:
标签: ios swift xcode uitableview tableviewcell