I am trying to make a circle UIImageView, and it works. Below is the way I use to make it:
UIImageView
[self.pic.layer setMasksToBounds:YES]; [self.pic.laye
extension UIImageView { func addShadow() { self.layer.shadowColor = UIColor.black.cgColor self.layer.shadowOffset = CGSize(width: 2, height: 5) self.layer.shadowOpacity = 0.5 self.layer.shadowRadius = 1.0 self.clipsToBounds = false } } try this code. hope it will help you....