Created
February 16, 2018 11:01
-
-
Save zenangst/a707866b4d4a5f4acf0e7a7a03369f86 to your computer and use it in GitHub Desktop.
How to write an NSViewController without interface builder - Example 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
class MyViewController: NSViewController { | |
override func loadView() { | |
self.view = NSView() | |
} | |
} | |
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