Set Shadow in UIView


class AppShadowView: UIView {

    override func awakeFromNib() {
        super.awakeFromNib()
        
        self.layer.shadowColor = RGBCOLOR(221, g:221, b:221).cgColor
        self.layer.shadowOffset = CGSize(width: 0, height: 4)
        self.layer.shadowOpacity = 0.4
        self.layer.shadowRadius = 4.0
        self.layer.masksToBounds = false
        self.layer.cornerRadius = 5
        self.layer.borderColor = RGBCOLOR(221, g:221, b:221).cgColor
        self.layer.borderWidth = 0.8
    }

    public func RGBCOLOR(_ r: CGFloat, g: CGFloat , b: CGFloat) -> UIColor {
       return UIColor(red: r/255.0, green: g/255.0, blue: b/255.0, alpha: 1.0)
    }
}