As is done in the iPhone Mail app, I would like have the \"Delete\" button which appears on swiping an editable table cell from right to left to animate when it is dism
I had the same problem, just now found out that there is some problem when we have empty cell.textLabel.text. Try add in
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath:
{
{...} // omitted code
cell.textLabel.text = @"whatever";
cell.textLabel.hidden = YES;
}
With this swipe button dismiss proper, but WHY? PS: tested with custom cells and built i.n
I've just ran into this issue as well. I have a series of tableViews and I noticed that some of them have the proper dismissal fade and others don't.
It seems the difference is a UITableViewCellAccessory. If this is set to anything other than UITableViewCellAccessoryNone then you get the proper animation. I think this might be a bug. Can anyone else confirm this behavior?
You should not need to animate the dismissal manually, it works the same way as invoking it so not sure why it is behaving differently in your app.
Are you using custom cells by any chance? As a thought for you to try, change the shouldIndentWhileEditingRowAtIndexPath:
method to return NO and see if it changes anything. The only thing I can think of is that your content indentation is interfering with the delete button area in a way that the animation can't be performed or is not behaving as it should.
- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}