I need to group Header, Cell and Footer in a Shadow, So have create container views and given shadow to these subviews but a thin line gap between them is visible even I have set TableView.separatorStyle = .none
Please see below Image for the same:
Below is the method for creating shadow on views
class ShadowView: UIView {
override var bounds: CGRect {
didSet {
setupShadow()
}
}
private func setupShadow() {
self.layer.masksToBounds = false
self.layer.shadowColor = UIColor.black.cgColor
self.layer.shadowOpacity = 2.2
self.layer.shadowOffset = CGSize(width: -1, height: 1)
self.layer.shadowRadius = 3
self.layer.shadowPath = UIBezierPath(rect: self.bounds).cgPath
self.layer.shouldRasterize = true
self.layer.rasterizationScale = UIScreen.main.scale
}
}