0

I have two table views side by side in the same view controller, they are both within their own view.

The second one on the right is been padded where as the left hand one is correct.

I have deleted the second one and copied the first to ensure every settings is 100% identical but still cannot remove the padding so that the cells line up horizontally.

Below is a screen shot showing my Storyboard, simular and Xcode view heirarchy, could someone please let me know where this is going wrong.

enter image description here

enter image description here

enter image description here

John Cogan
  • 1,034
  • 4
  • 16
  • 39

2 Answers2

0

Hi followed similar steps and did not get this issue so you might be making some kind of mistake you can see this in picture below.enter image description here.

Check for your section once again.

Vish
  • 341
  • 1
  • 4
  • 19
  • Recreated the entire ViewController and still get the same issue. Only way I could get the cells to line up correctly was to increase the vertical size of the right hand view until they lined up. – John Cogan Dec 31 '13 at 05:03
0

This might be occurring because the UIView containing that UITableView is the topmost view in the controller's main view. This Person solved a seemingly similar issue by adding a garbage transparent view above the table to prevent the insets from automatically pushing the cells down.

If that doesn't work for you, there are many possible solutions here.

EDIT: An excellent experiment would be to see if putting that left hand table view above the right hand table view causes the tables to swap the padding.

Community
  • 1
  • 1
Mike S
  • 11,329
  • 6
  • 41
  • 76
  • Hi MikeThanks for this, managed to figure this out yesterday evening (Solution #1) as per my comment below. – John Cogan Dec 31 '13 at 09:30