func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
//hide this cell.
}
奖金 - 有没有办法“淡出”效果,所以它不是那么刺耳?
答案 0 :(得分:1)
here is a great tutorial on this topic
长话短说,做这样的事情
override func tableView(tableView: UITableView,
commitEditingStyle editingStyle: UITableViewCellEditingStyle,
forRowAtIndexPath indexPath: NSIndexPath) {
switch editingStyle {
case .Delete:
// remove the deleted item from the model
self.items.removeAtIndex(indexPath.row)
// remove the deleted item from the `UITableView`
self.tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade)
default:
return
}
}