macOS/iOS API解説

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

目次

NSAppearanceクラス

INDEX>AppKit>

アピアランスクラス
継承 NSObject
準拠 NSObject (NSObject)
フレームワーク /System/Library/Frameworks/AppKit.framework
使用可能 OS X 10.9以降
定義
インポート文 @import AppKit;

developer.apple.com

概要

ウインドウなどの見え方のクラスです。

●NSAppearanceNameVibrantDark
f:id:jjj777:20151103144730p:plain

●NSAppearanceNameVibrantLight
f:id:jjj777:20151103144836p:plain

メソッドとプロパティ

アピアランスの作成

- initWithAppearanceNamed:bundle:
 バンドルと名前でNSAppearanceオブジェクトのインスタンスを初期化して返します

アピアランスの取得

+ appearanceNamed:
 指定した名前でアピアランスオブジェクトを作ります

現在のアピアランスのセットと取得

+ currentAppearance
 現在のアピアランスを返します
+ setCurrentAppearance:
 現在のアピアランスをセットします

Vibrancyの管理

allowsVibrancy
 現在のアピアランスがvibrancyを適用できるかどうか 10.10-


参照

関連記事(外部リンク)

stackoverflow.com


更新時バージョン

OS X 10.11