Skip to content

Instantly share code, notes, and snippets.

@santoshrajan
Last active November 30, 2019 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save santoshrajan/71546afd60b64f25bde5 to your computer and use it in GitHub Desktop.
Save santoshrajan/71546afd60b64f25bde5 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 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