-
-
Save milanpanchal/ea5b9218785afb806957f6450a2bb80b to your computer and use it in GitHub Desktop.
[iOS Blog] UIView Shadow Example - Updated
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
private func setupShadowView() { | |
shadowView.layer.cornerRadius = 12 | |
shadowView.layer.shadowOffset = CGSize(width: 10, height: 10) // Spread x, y | |
shadowView.layer.shadowOpacity = 0.5 // opacity, 50% | |
shadowView.layer.shadowRadius = 1.0 // divide the blur by iOS screen scale factor | |
shadowView.layer.shadowColor = UIColor.black.cgColor | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Article Link: https://medium.com/@milanpanchal24/how-to-match-shadow-and-blur-to-the-sketch-application-d4ed20dfa816