Created
November 20, 2019 11:45
-
-
Save Sangsom/02d1d74ecd9f598075f4bd0ffc214820 to your computer and use it in GitHub Desktop.
This adds shadow to a view
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 UIView { | |
func dropShadow() { | |
self.layer.shadowOpacity = 0.7 | |
self.layer.shadowOffset = CGSize(width: 3.0, height: 2.0) | |
self.layer.shadowRadius = 5.0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment