フルスクリーンモードにする
アプリケーションからフルスクリーンモードにするには
【Swift】
window.collectionBehavior = NSWindowCollectionBehavior.FullScreenPrimary
主に使用するウインドウのcollectionBehaviorにNSWindowCollectionBehavior.FullScreenPrimaryをセットする。
window.toggleFullScreen(self)
フルスクリーン、ウインドウモードの切り替え。
関連記事(外部サイト)
Technical Note TN2062: Creating Kiosks
Implementing the Full-Screen Experience
osx - (OS X) Detecting when front app goes into fullscreen mode - Stack Overflow
Stork Lab: Emacs 23.3.50 フルスクリーン Lion 対応版
http://electricsheep.googlecode.com/svn/trunk/client_generic/MacBuild/ESWindow.m
例文
//NSApplication currentSystemPresentationOptions/presentationOptions @IBAction func function062(sender: AnyObject) { let anApplication = MyApplication.sharedApplication() window.collectionBehavior = NSWindowCollectionBehavior.FullScreenPrimary window.toggleFullScreen(self) } //NSApplication currentSystemPresentationOptions/presentationOptions @IBAction func function063(sender: AnyObject) { let anApplication = MyApplication.sharedApplication() switch anApplication.currentSystemPresentationOptions { case NSApplicationPresentationOptions.FullScreen: NSLog("system FullScreen YES") case NSApplicationPresentationOptions.Default: NSLog("system FullScreen NO") default: break } switch anApplication.presentationOptions { case NSApplicationPresentationOptions.FullScreen: NSLog("app FullScreen YES") case NSApplicationPresentationOptions.Default: NSLog("app FullScreen NO") default: break } }