The point is, the roundCorner is draw by a subview of UITableViewCell
, and mean while, it's not a public class, there is no way you can get layer.cornerRadius
from any view. So we need to resolve this problem by ourselves.
There are 2 cases.
-
There is only one cell.
This case is ease, just use
cell.contentView.layer.cornerRadius
andcell.contentView.layer.masksToBounds
to make it work. -
There are more than one cell.