アクセスするときtableView(tableView,editActionsForRowAtIndexPath)
に、以前に選択した で関数を呼び出したいのですUITableViewCell
が、tableView.indexPathForSelectedRow
を返していnil
ます。
これが私が使用しているコードです。if ステートメント内のブロックは実行されずtableView.indexPathForSelectedRow
、値を返しnil
ます。
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
if let selectedRow = activityTableView.indexPathForSelectedRow {
updateCell(atIndexPath: selectedRow)
}
var rowActions = [UITableViewRowAction]()
....
return rowActions
}