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)

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.
source
share