Last active
April 26, 2020 15:47
-
-
Save alexnikol/b5f5136bb654617626cdf998614bc87f to your computer and use it in GitHub Desktop.
Basic properties of UIView
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
// MARK: Change cornerRadius UIView | |
view.layer.cornerRadius = 5 | |
// MARK: Set shadow to UIView | |
view.layer.shadowOffset = CGSize(width: 5, height: 5) | |
view.layer.shadowOpacity = 0.7 | |
view.layer.shadowRadius = 5 | |
view.layer.shadowColor = UIColor.green.cgColor | |
// MARK: Set border to UIView | |
view.layer.borderColor = UIColor.green.cgColor | |
view.layer.borderWidth = 2.0 | |
// MARK: Set backgroundColor to UIView | |
view.layer.backgroundColor = UIColor.yellow.cgColor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment