I want to set different values to corner radius with shadow effect to UIView inside TableView Cell, like this:
My code is:
cell.headerView.round(corners: [.topRight], radius: 35)
extension UIView {
func round(corners: UIRectCorner, radius: CGFloat) {
let path = UIBezierPath(roundedRect:self.bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
let mask = CAShapeLayer()
mask.path = path.cgPath
self.layer.mask = mask
self.layoutIfNeeded()
}
}
This is working in iPhone SE Simulator but not working iPhone 6S Simulator.