読者です 読者をやめる 読者になる 読者になる

Cocoa API解説(macOS/iOS)

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。

目次

NSApplicationPresentationOptions

ApplicationKit NSApplication 10.6

INDEX>AppKit>NSApplication

アプリケーションの表示オプション

Objective-C

enum {
   NSApplicationPresentationDefault                    = 0,
   NSApplicationPresentationAutoHideDock               = (1 <<  0),
   NSApplicationPresentationHideDock                   = (1 <<  1),
   NSApplicationPresentationAutoHideMenuBar            = (1 <<  2),
   NSApplicationPresentationHideMenuBar                = (1 <<  3),
   NSApplicationPresentationDisableAppleMenu           = (1 <<  4),
   NSApplicationPresentationDisableProcessSwitching    = (1 <<  5),
   NSApplicationPresentationDisableForceQuit           = (1 <<  6),
   NSApplicationPresentationDisableSessionTermination  = (1 <<  7),
   NSApplicationPresentationDisableHideApplication     = (1 <<  8),
   NSApplicationPresentationDisableMenuBarTransparency = (1 <<  9)
   NSApplicationPresentationFullScreen                 = (1 << 10),
   NSApplicationPresentationAutoHideToolbar            = (1 << 11)
};
typedef NSUInteger NSApplicationPresentationOptions;

Swift

struct NSApplicationPresentationOptions : RawOptionSetType {
    init(_ rawValue: UInt)
    init(rawValue rawValue: UInt)
    static var Default: NSApplicationPresentationOptions { get }
    static var AutoHideDock: NSApplicationPresentationOptions { get }
    static var HideDock: NSApplicationPresentationOptions { get }
    static var AutoHideMenuBar: NSApplicationPresentationOptions { get }
    static var HideMenuBar: NSApplicationPresentationOptions { get }
    static var DisableAppleMenu: NSApplicationPresentationOptions { get }
    static var DisableProcessSwitching: NSApplicationPresentationOptions { get }
    static var DisableForceQuit: NSApplicationPresentationOptions { get }
    static var DisableSessionTermination: NSApplicationPresentationOptions { get }
    static var DisableHideApplication: NSApplicationPresentationOptions { get }
    static var DisableMenuBarTransparency: NSApplicationPresentationOptions { get }
    static var FullScreen: NSApplicationPresentationOptions { get }
    static var AutoHideToolbar: NSApplicationPresentationOptions { get }
}

解説

  • NSApplicationPresentationDefault
  • NSApplicationPresentationAutoHideDock
  • NSApplicationPresentationHideDock
  • NSApplicationPresentationAutoHideMenuBar
  • NSApplicationPresentationHideMenuBar
  • NSApplicationPresentationDisableAppleMenu
  • NSApplicationPresentationDisableProcessSwitching
  • NSApplicationPresentationDisableForceQuit
  • NSApplicationPresentationDisableSessionTermination
  • NSApplicationPresentationDisableHideApplication
  • NSApplicationPresentationDisableMenuBarTransparency
  • NSApplicationPresentationFullScreen

  フルスクリーンモード

  • NSApplicationPresentationAutoHideToolbar

フレームワーク

ApplicationKit

クラス

NSApplication

使用可能

10.6

更新時のバージョン

OS X 10.10

参照

presentationOptions - Cocoa API解説(iOS/OS X)

currentSystemPresentationOptions - Cocoa API解説(iOS/OS X)


フルスクリーンモードにする - Cocoa API解説(iOS/OS X)

関連記事

例文

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