App Kitで自動フルスクリーン
NSWindowのtoggleFullScreenメソッドを使う。
import Cocoa class ViewController: NSViewController { override func viewDidLoad() { super.viewDidLoad() } override func viewDidAppear() { super.viewDidAppear() view.window?.collectionBehavior = NSWindow.CollectionBehavior.fullScreenPrimary view.window?.toggleFullScreen(nil) } override var representedObject: Any? { didSet { // Update the view, if already loaded. } } }