Skip to content

Instantly share code, notes, and snippets.

@vikrant-Ios
Last active December 1, 2017 09:32
Show Gist options
  • Save vikrant-Ios/4fc9d3258649046a28a580f4b402652b to your computer and use it in GitHub Desktop.
Save vikrant-Ios/4fc9d3258649046a28a580f4b402652b to your computer and use it in GitHub Desktop.
view property add with closure
@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