I have a question regarding editing a UITableView. I want to know how to hide a subview when the deletion control is tapped and the the delete button appears. I've figured out how to hide the subview when the delete button is tapped, but that is too late. I used the following code to accomplish that:
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
exerciseDate = (UILabel *)[cell viewWithTag:8989];
exerciseDate.hidden = YES;
As you can see in the screenshots below, the text 'Today' and 'Yesterday' is the subview of each cell. I want to hide this subview when the deletion control (the red round button to the left) is tapped and the delete button appears (screen shot 2). Do I need to set up a listener for the deletion control? If so, how would I do that?
Thank you in advance!