ScofieldNguyen
9/11/2017 - 8:14 AM

Drop Shadow extension

extension UIView {
    func setShadowBorder() {
        self.layer.masksToBounds = false
        // self.clipsToBounds = true
        let radius = self.frame.width / 2
        self.layer.cornerRadius = radius
        self.layer.borderColor = UIColor.white.cgColor
        self.layer.shadowColor = UIColor.gray.cgColor
        self.layer.shadowOpacity = 1
        self.layer.shadowOffset = CGSize.zero
        self.layer.shadowRadius = 3
        self.layer.borderWidth = 3
    }
}