简体   繁体   中英

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 :

在此处输入图片说明

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

在此处输入图片说明

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM