Layout changes after canceling uitableviewcell delete operation

I have a uitableviewcell client with an image that is aligned to the right of the cell. When I scroll left to delete and then abort, the image appears even more to the right before that. Check out the attached image.

Layout

It looks like the cell is in some sort of edit mode, but I'm not sure.

If I try to use the same approach in the cell below, it displays the same as before (incorrectly), but the cell that was previously displayed incorrectly returns to normal.

So only one cell at a time ...

Any ideas?

Thank!

/ Henrik

+3


source to share


3 answers


I had the same problem and was able to solve it by setting the cellView box explicitly:



-(void) awakeFromNib
{
   self.accessoryView = [[UIView alloc] initWithFrame:CGRectZero];
}

      

0


source


I have the same problem. I analyzed the size of the content view before and after canceling the delete operation.

Original frame sizes for cell.contentView:

cell.contentView: Origin: (0.000000, 0.000000), size: (568.000000,44.000000)

      



After canceling the delete operation:

cell.contentView: Origin: (0.000000, 0.000000), size: (320.000000,43.500000)

      

I currently don't have a solution yet, but I'm looking into it further.

0


source


It looks like this problem went away when I built my app with xcode 7 and ran it on ios9. However, I think the main reason was only xcode 7.

Please, try...

/ Henrik

0


source







All Articles