macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

presentationOptions

INDEX>AppKit>NSApplication

アプリケーションのプレゼンテーションオプション

Objective-C

@property NSApplicationPresentationOptions presentationOptions

Swift

var presentationOptions: NSApplicationPresentationOptions

解説

アプリケーションのプレゼンテーションオプション
フルスクリーンにしたり、メニューバーの表示・非表示など

引数

Objective-C

NSApplicationPresentationOptions

Swift

NSApplicationPresentationOptions

フレームワーク

ApplicationKit

クラス

NSApplication

使用可能

10.6

更新時のバージョン

OS X 10.10

参照

関連記事

例文

//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
        }
    }