how to delete row in table view without Edit Button?
<p>I want to show all rows in my tableview (when it loads) with a red mark (minus sign) in <code>UITableViewCellStateShowingDeleteConfirmationMask</code>. In other words if I click the red mark, it should show a delete button for that particular row. (The edit button's action will be taken without pressing the edit button) in the table view.  The following code gives a run time error. and also it did not show the red minus sign in each row.  What do I have to do? (I want to do this without requiring an edit button.)</p>

<pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
NSArray *deleteIndexPaths = [NSArray arrayWithObjects: [NSIndexPath indexPathForRow:indexPath.row inSection:0], nil]; 
[tableView beginUpdates];
[tableView deleteRowsAtIndexPaths:deleteIndexPaths withRowAnimation:UITableViewRowAnimationFade]; 
[tableView endUpdates];
}
</code></pre>
