Last active
November 6, 2021 06:51
-
-
Save dimkagithub/0d0fb19d77a1c8c2dcf3a1e8f1c2d9b1 to your computer and use it in GitHub Desktop.
UIImageView Extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIImageView { | |
func setImageShadow() { | |
super.layoutSubviews() | |
self.layer.shadowColor = UIColor.lightGray.cgColor | |
self.layer.shadowOpacity = 1.0 | |
self.layer.shadowRadius = 5.0 | |
self.layer.shadowOffset = CGSize(width: 0.0, height: 0.0) | |
self.layer.cornerRadius = bounds.height / 2 | |
self.clipsToBounds = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment