Created
April 29, 2018 20:11
-
-
Save Anatoli-Petrosyants/19e4b663ee71f7cabd16639e1408ed4a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| lazy var v1:UIView = { | |
| let v = UIView() | |
| v.backgroundColor = .blueColor() | |
| return v | |
| }() | |
| lazy var v2:UIView = { | |
| let v = UIView() | |
| v.backgroundColor = .blueColor() | |
| return v | |
| }() | |
| lazy var stack:UIStackView = { | |
| let s = UIStackView(frame: self.view.bounds) | |
| s.axis = .Vertical | |
| s.distribution = .FillEqually | |
| s.alignment = .Fill | |
| s.spacing = 5 | |
| s.autoresizingMask = [.FlexibleWidth, .FlexibleHeight] | |
| s.addArrangedSubview(self.v1) | |
| s.addArrangedSubview(self.v2) | |
| return s | |
| }() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment