View grouped tables - rounded cells?

I would like to create rounded cells for my UITableView. But not for each cell, only the first and last row (as shown on my screen)

enter image description here

The first is not a problem, I only use:

tableView.layer.cornerRadius = 10

But what about the latter? Any ideas how to solve this? Thanks in advance.

+4
source share
1 answer

You use this code after tableView.layer.cornerRadius = 10

tableView.layer.masksToBounds = true

I hope I answered your question.

+4
source

All Articles