Skip to content

Instantly share code, notes, and snippets.

@santoshrajan
Last active November 30, 2019 18:48
Show Gist options
  • Save santoshrajan/b517bcd65eb25cefa9a6 to your computer and use it in GitHub Desktop.
Save santoshrajan/b517bcd65eb25cefa9a6 to your computer and use it in GitHub Desktop.
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
view.backgroundColor = UIColor.lightGrayColor()
var vLayout = VerticalFitLayout(width: view.frame.width)
vLayout.backgroundColor = UIColor.cyanColor()
view.addSubview(vLayout)
let view1 = UIView(frame: CGRectMake(100, 50, 100, 100))
view1.backgroundColor = UIColor.redColor()
vLayout.addSubview(view1)
let view2 = UIView(frame: CGRectMake(100, 50, 100, 0))
view2.backgroundColor = UIColor.magentaColor()
vLayout.addSubview(view2)
let view3 = UIView(frame: CGRectMake(100, 50, 100, 100))
view3.backgroundColor = UIColor.blueColor()
vLayout.addSubview(view3)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment