tags:

views:

20

answers:

2

hello,

i have a little problem. when i enter the edit mode of my uitableview the a manuel added label should disappear. i realized this by setting the alpha of this label-field to 0 in following method:

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {

    if ([self isEditing] && [indexPath row] == [tripArray count]) {
        return UITableViewCellEditingStyleInsert;
    }
    [[[[self tableView] cellForRowAtIndexPath:indexPath] detailTextLabel] setAlpha:0];
    return UITableViewCellEditingStyleDelete;

}

But in which delegate-methode of my tableview i can set the alpha back to 1, when the edit mode was finished??? hopefully someone has an idea? i didn't find the right one......

A: 

Take a look at: tableView:commitEditingStyle:forRowAtIndexPath:. UITableView will call this data source method when the user taps on the delete or insert button on a table view cell.

Alex
but what is when the user pushes just the 'done'-button and no row is deleted or inserted?
Micko
has someone an idea? i don't find the right trick...
Micko
A: 

I made a work around and used the standard text labels from the standard cells. this text labels disappear in edit mode... not a nice way, but it did it for me.

Micko