Last active
November 30, 2019 18:48
-
-
Save santoshrajan/71546afd60b64f25bde5 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
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
view.backgroundColor = UIColor.lightGrayColor() | |
var hLayout = HorizontalFitLayout(height: 150) | |
hLayout.backgroundColor = UIColor.cyanColor() | |
view.addSubview(hLayout) | |
let view1 = UIView(frame: CGRectMake(10, 50, 50, 50)) | |
view1.backgroundColor = UIColor.redColor() | |
hLayout.addSubview(view1) | |
let view2 = UIView(frame: CGRectMake(10, 50, 0, 50)) | |
view2.backgroundColor = UIColor.magentaColor() | |
hLayout.addSubview(view2) | |
let view3 = UIView(frame: CGRectMake(10, 50, 50, 50)) | |
view3.backgroundColor = UIColor.greenColor() | |
hLayout.addSubview(view3) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment