Created
September 17, 2016 18:53
-
-
Save qmchenry/943cee58ec81061b1f8af07d64dc6f99 to your computer and use it in GitHub Desktop.
Then and now
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
// with Then | |
let label = UILabel().then { | |
$0.textAlignment = .center | |
$0.textColor = .black | |
$0.text = "Hello, World!" | |
} | |
// just Swift | |
let label: UILabel() = { | |
$0.textAlignment = .center | |
$0.textColor = .black | |
$0.text = "Hello, World!" | |
}(UILabel()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment