-1

I have a table view whose gap between cells are two low. how to add gap or space between two table view cells ? I am using xcode to make UItableview.

Manzoor
  • 57
  • 3
  • @TejaNandamuri this answer covers the my second option of my answer but if he cannot replace rows with section option 1 can also work for him. – Ran Hassid Jul 20 '16 at 18:53

1 Answers1

0

You have 2 options:

  1. In your tableview cell create transparent UIView, put it on the bottom of the cell, add autolayout constraints and set the height constraint to the height of your gap

  2. Replace numberOfSectionsInTableView method with numberOfRowsInSection so each item in your array will be a section and not a row and then implement the method heightForHeaderInSection and return the value of the gap.

Hope it helps

Ran Hassid
  • 2,788
  • 1
  • 12
  • 20