0

I am new to auto-layout in IB and am having some issues. I am creating a new TableViewCell using a .xib file. I have a cell with the height of 130 and width of 320. I have another plain uiview within the cell and that has a width of 120 with the top,bottom, and leading spacing set to 0. I want the edge to align to the super view, it only works if i set the spacings to -8... Does anyone know what I can be doing wrong and why there is automatically 8 spacing added for me?

Here is a screenshot.Magic 8 spacing for top/bottom/leading added...

thunderousNinja
  • 3,510
  • 9
  • 37
  • 49

1 Answers1

2

If you targeting iOS8 then the new introduces layout margins can lead to this observation.

Edit: From the linked post here is how to change the layout margins:

myView.layoutMargins = UIEdgeInsetsMake(0, 0, 0, 0);
dasdom
  • 13,975
  • 2
  • 47
  • 58