Skip to content

Instantly share code, notes, and snippets.

@ivangodfather
Created March 4, 2015 13:25
Show Gist options
  • Save ivangodfather/ec13b309afc009930320 to your computer and use it in GitHub Desktop.
Save ivangodfather/ec13b309afc009930320 to your computer and use it in GitHub Desktop.
1:
class ViewController: UIViewController {
override func loadView() {
view = NSBundle.mainBundle().loadNibNamed("View", owner: self, options: nil).first! as UIView
}
}
2:
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(NSBundle.mainBundle().loadNibNamed("View", owner: self, options: nil).first! as UIView)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment