Skip to content

Instantly share code, notes, and snippets.

@zenangst
Created February 16, 2018 11:00
Show Gist options
  • Save zenangst/164579dd727ec508c36a2dd674b6d718 to your computer and use it in GitHub Desktop.
Save zenangst/164579dd727ec508c36a2dd674b6d718 to your computer and use it in GitHub Desktop.
How to write an NSViewController without interface builder - Example 2
import Cocoa
class MyViewController: NSViewController {}
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