I say true because while one can do tableView.layer.cornerRadius = 5.0
, that method isn't 100%.
It works great when you have enough cells to fill the entire frame of the UITableView, but... if you don't have enough cells to fill it entirely, then you're in a rut because the cells won't be rounded.
I assume the best solution requires rounding the corners of the 1st cell (indexPath.row == 0
) and the last cell (indexPath.row == data.count - 1
)... but the problematic piece of this is that I need only the top 2 corners of the top cell rounded and the bottom two corners of the bottom cell rounded.
I've thought about using the UIBezierPath/CALayers method, but I don't know how costly it is and further, my cells all have custom heights, so I don't think I can accurately give my cell bounds that the UIBezierPath/CALayers method requires.
How would I achieve this?