Skip to content

Instantly share code, notes, and snippets.

@zenangst
Created February 16, 2018 10:39
Show Gist options
  • Save zenangst/0f885dab7473b1e665a2a367fb34f7ee to your computer and use it in GitHub Desktop.
Save zenangst/0f885dab7473b1e665a2a367fb34f7ee to your computer and use it in GitHub Desktop.
How to write an NSViewController without interface builder - Example 1
import UIKit
class MyViewController: UIViewController {}
let frame = CGRect(origin: .zero, size: CGSize(width: 100, height: 100))
let viewController = MyViewController()
viewController.view.frame = frame
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment