iosswiftuitableviewswiftuiuikit

Is there a way to change corner radius of UITableView in insetGrouped style?


Like This-

enter image description here

Has anyone been in a similar situation?


Solution

  • final class InsetsGroupedCell: UITableViewCell {
    
        override class var layerClass: AnyClass {
            InsetsGroupedLayer.self
        }
    }
    
    final class InsetsGroupedLayer: CALayer {
    
        override var cornerRadius: CGFloat {
            get { 16 }
            set { }
        }
    }