ken
ken

Reputation: 2662

How to create space between 2 table view cell?

I have a TableViewCell which have the border at the surrounding.So what some space at the bottom of each cell.

Here is what I want :

enter image description here

I see a lot of question is work for cell which doesnt have any border.What I want is the space is outside the border at the bottom of every cell.

Now my cell is look like this

enter image description here

So how can I achieve the output that I stated in first picture?

Upvotes: 0

Views: 829

Answers (1)

Shehata Gamal
Shehata Gamal

Reputation: 100503

It's easily accomplished with static/dynamic tableView cells & don't give the border to the cell itself but to the subview named TopView

 tableViewCell
    ->ContentView
     ->TopView ---- with border height(static/dynamic)
     ->DownView transparent ---- height(10)

with

 tableView.separatorStyle = .none

Upvotes: 2

Related Questions