I am trying to get a similar UITableView
selection look as shown on the 'Upcoming cell' below. I am achieving the rounded corners but am unsure how to get the BKG to not be the 100% width of the tableView
. The current code I have is:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "folderCell", for: indexPath) as! FolderTableViewCell
cell.layer.cornerRadius = 8
return cell
}
EDIT: All solutions below are still not solving this issue... 14/11/19