0

I have a UITableView which is placed on scrollView. Everything is working fine, but when I am editing the table and touching small circular delete button, confirmation Delete rectangular button does not appear. The reason for this is very clear. As the table is scrollable horizontally, the confirmation Delete button appears at last of cell which I cannot see in start. And when I scroll horizontally, it disappears.
So, is there any way I can set the origin of that Delete button, so that it appears in the start?

Andrey Zverev
  • 4,409
  • 1
  • 28
  • 34
Nitish
  • 13,845
  • 28
  • 135
  • 263

1 Answers1

0

I am not sure about it but you can try below code in your

- (void)tableView:(UITableView *)aTableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle 
forRowAtIndexPath:(NSIndexPath *)indexPath 
{

    if (editingStyle == UITableViewCellEditingStyleDelete) 
    {
    }
}

write this code

 for (UIView *subview in self.subviews) {

        if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellDeleteConfirmationControl"]) {

            UIView *deleteButtonView = (UIView *)[subview.subviews objectAtIndex:0];
            CGRect f = deleteButtonView.frame;
            f.size.width = xx;
            f.size.height = xx;
            deleteButtonView.frame = f;

       }
Maulik
  • 19,348
  • 14
  • 82
  • 137
  • refer this post for Custom cell http://stackoverflow.com/questions/6861431/uitableviewcell-delete-button-frame – Maulik Feb 06 '12 at 10:58
  • No Maulik. This is working. This method is called when confirmation delete is touched. My problem is, I can't even see the confirmation Delete. – Nitish Feb 06 '12 at 11:07