Skip to content

Instantly share code, notes, and snippets.

@premedios
Created June 28, 2014 14:41
Show Gist options
  • Save premedios/2d85562457933315aabe to your computer and use it in GitHub Desktop.
Save premedios/2d85562457933315aabe to your computer and use it in GitHub Desktop.
MainViewController.swift
class MainViewController: UIViewController {
var viewController : UIViewController {
didSet {
addChildViewController(viewController)
}
}
init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
viewController = UIViewController()
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
// Custom initialization
}
init(coder aDecoder: NSCoder!)
{
viewController = UIViewController()
super.init(coder: aDecoder)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// #pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue?, sender: AnyObject?) {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment