Last active
November 6, 2021 06:52
-
-
Save dimkagithub/8ed9af8adf448b57a88bf86f84e746ab 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