Created by CyanHall.com on 12/22/2020 , Last updated: 03/30/2021.
👉  github shields Star me if it’s helpful.
demo image
    //
//  SDShadowView.swift
//  Created by Cyanhall.com on 21/12/2020.
//
import UIKit

class SDShadowView: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.setup()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)!
        self.setup()
    }
    func setup() {
        layer.cornerRadius = 5.0;
        layer.masksToBounds = false
        layer.shadowOffset = CGSize.init(width: 0, height: 3)
        layer.shadowColor = UIColor.gray.cgColor
        layer.shadowRadius = 3
        layer.shadowOpacity = 0.4
    }
}
  
Reference: UIView with rounded corners and drop shadow?
Maitained by Cyanhall.com, Copy Rights @ CC BY-NC-SA 4.0     ExcelRoadMap