Skip to content

Instantly share code, notes, and snippets.

@juliofruta
Last active August 8, 2016 22:54
Show Gist options
  • Save juliofruta/6c55dc43ba1442f4ce60a7dd567070ee to your computer and use it in GitHub Desktop.
Save juliofruta/6c55dc43ba1442f4ce60a7dd567070ee to your computer and use it in GitHub Desktop.
A gist for examples
let tableViewA = UITableViewController()
let tableViewB = UITableViewController()
let viewController = UIViewController()
viewController.addChildViewController(tableViewA)
viewController.addChildViewController(tableViewB)
tableViewA.view.frame = CGRect(x: 0.0, y: 0.0, width: 300, height: 250)
tableViewB.view.frame = CGRect(x: 0.0, y: 250.0 , width: 300, height: 250)
viewController.view.frame = CGRect(x: 0.0, y: 0.0, width: 300, height: 500)
tableViewA.view.backgroundColor = UIColor.greenColor()
tableViewB.view.backgroundColor = UIColor.yellowColor()
viewController.view.backgroundColor = UIColor.redColor()
viewController.view.addSubview(tableViewA.view)
viewController.view.addSubview(tableViewB.view)
viewController.view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment