私はtableView
です。そして私は新しいカスタム削除アクションを作成したい!しかし、新しいindexPath
が必要です。どのように新しいindexPath
を取得しますか?それは作品tableViewの新しいNSIndexPathを取得するには?
func newFunction(sender:UIButton) {
let indexPath = NSIndexPath(forRow: 0, inSection: 0)
self.tableView.beginUpdates()
self.items.removeAtIndex(indexPath.row)
self.tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Fade)
self.tableView.endUpdates()
self.tableView.reloadData()
}
:
は、ここに私のコードです。しかし、最初のオブジェクトだけを削除します。