3

After upgrading to Xcode 5, the delete button appears behind the cell content in a table view.

How do I get it to show up on top of the cell content? In the past swiping from right to left on the table cell used to bring up the Delete button over the cell contents and now it comes up behind.

enter image description here

The content is added to the 'Content View'

enter image description here

Xavier John
  • 8,474
  • 3
  • 37
  • 51
  • 4
    Have you added the custom subviews directly to the cell or have you used cell.contentView? The latter being the one you want – mmackh Sep 29 '13 at 21:47
  • Check constraints for that view, maybe it is pinned to the right side of table and doesn't move with the gesture. – Tricertops Sep 29 '13 at 22:07
  • Thank, iMartin. I think that was the reason. I moved it a little, then expanded the Document Outline, selected 'Update Constrains' and clicked 'Fix Misplacement'. – Xavier John Sep 29 '13 at 22:19

1 Answers1

0

I'm going to make this an answer, just so it's more prominent than a comment (but iMartin, you nailed this).

The constraints I had placed in my cell were causing the views to not move with the Delete button. I selected every single subview of ContentView for my UITableViewCell subclass and did:

  1. Editor → Resolve Auto Layout Issues → Clear Constraints
  2. Editor → Resolve Auto Layout Issues → Reset to Suggested Constraints

This remade all my constraints for me, and properly configured them to allow the Delete button to move the contents.

Community
  • 1
  • 1
Ethan Mick
  • 9,517
  • 14
  • 58
  • 74