This I want
My Code
let shadowPath = UIBezierPath(rect: shadowView.bounds).cgPath
shadowView.layer.shadowColor = UIColor.grey.cgColor
shadowView.layer.shadowOffset = CGSize(width: 0, height: 1)
shadowView.layer.shadowOpacity = 0.5
shadowView.layer.masksToBounds = false
shadowView.layer.shadowPath = shadowPath
shadowView.layer.shadowRadius = 5
I want to implement exactly same shadow in my UIVIew. When I run my app with above code it spread over 4 sides. Notice : the shadow thin at both edges and bold at centre.

