Reshan Auston Reshan Auston - 1 month ago 10
iOS Question

UITableViewCell overlaps the delete button in the UITableView

As shown in the image below when I enable the edit mode for the tableview and click the (-) button the delete button is hidden behind the UITAbleViewCell.

Not sure what causing the issue as I have used same similar type of custom UITAbleVeiwCells and delete worked without any problem.

http://i.stack.imgur.com/W9lkj.jpg

Can someone enlighten me where I'm going wrong and why cell behaves in peculiar way.

Answer

I think cell.clipsToBounds = YES; can resolve the issue. Also try using the imageView.maskToBounds = YES; I don't know if you are having the images locally or you are downloading it from server. It could happen that the image is not downloaded when the delete button is shown and when it's downloaded the image is shown up as per it's size (contentMode). That's why I think setting imageView.masksToBounds could resolve the issue.