canRepresent
スクリーンでサポートされる色深度を返します
Swift
open func canRepresent(_ displayGamut: NSDisplayGamut) -> Bool
解説
ガモットマッピング可能かどうかを返します。
返り値
色深度の配列
Swiftopen func canRepresent(_ displayGamut: NSDisplayGamut) -> Bool
引数
フレームワーク
ApplicationKit
クラス
NSScreen
使用可能
10.12
参照
更新時のバージョン
OS X 10.14.5
Swift4.0
例文
Swift4.0
@IBAction func function008(_ sender: Any) { let screenArray : [AnyObject] = NSScreen.screens for value in screenArray { let result : Bool = value.canRepresent(.sRGB) if (result){ print("YES") }else{ print("NO") } } }