Hi guys, I have a plain ol UITableView, and I want its cells to have the delete button on the left. I know this is done using UITableViewCellStyleDelete.
I set up my tableview like so:
adjustmentTable.rowHeight = 35.0;
[adjustmentTable setEditing:YES animated:YES];
adjustmentTable.allowsSelectionDuringEditing = YES;
adjustmentTable.userInteractionEnabled = YES;
With breakpoints, i know that this function is getting called:
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row < tmpNumOfRows) {
return UITableViewCellEditingStyleDelete;
}
return UITableViewCellEditingStyleInsert;
}
and in my cellForRowAtIndexPath method, i set the cells editing mode to YES. When my tableview shows up, it has the indentations for the buttons on the left, but no buttons show up, its just a white indentation. Am I missing more steps to get the red/green buttons to show?