Last active
December 1, 2017 09:32
-
-
Save vikrant-Ios/4fc9d3258649046a28a580f4b402652b to your computer and use it in GitHub Desktop.
view property add with closure
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
@IBOutlet weak var myCustomView: UIView! { | |
didSet { | |
myCustomView.backgroundColor = UIColor.blue | |
myCustomView.layer.cornerRadius = myCustomView.bounds.width / 2 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment