Skip to content

Instantly share code, notes, and snippets.

@helmutgranda
Forked from santoshrajan/LayoutExample3.swift
Created February 17, 2016 08:33
Show Gist options
  • Save helmutgranda/b93f18c1ad5bd535987f to your computer and use it in GitHub Desktop.
Save helmutgranda/b93f18c1ad5bd535987f 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()
let vLayout = VerticalLayout(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, 100))
view2.backgroundColor = UIColor.magentaColor()
vLayout.addSubview(view2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment