次の方法で共有


SKView.GetAppearance メソッド

定義

オーバーロード

GetAppearance(UITraitCollection, Type[])

TReturns the UIAppearance class for the specified traits and container hierarchy.

GetAppearance(UITraitCollection)

このクラスの UIAppearance クラスを返します。

GetAppearance<T>()

SKView のサブクラスの外観プロキシ SKView.SKViewAppearance を取得します。

GetAppearance<T>(UITraitCollection)

SKView のサブクラスの外観プロキシ SKView.SKViewAppearance を取得します。

GetAppearance<T>(UITraitCollection, Type[])

ビューが指定された階層でホストされている場合に、指定した特性コレクションを持つ SKView のサブクラスの外観プロキシ SKView.SKViewAppearance を取得します。

GetAppearance(UITraitCollection, Type[])

TReturns the UIAppearance class for the specified traits and container hierarchy.

public static SpriteKit.SKView.SKViewAppearance GetAppearance (UIKit.UITraitCollection traits, params Type[] containers);
static member GetAppearance : UIKit.UITraitCollection * Type[] -> SpriteKit.SKView.SKViewAppearance

パラメーター

containers
Type[]

戻り値

適用対象

GetAppearance(UITraitCollection)

このクラスの UIAppearance クラスを返します。

public static SpriteKit.SKView.SKViewAppearance GetAppearance (UIKit.UITraitCollection traits);
static member GetAppearance : UIKit.UITraitCollection -> SpriteKit.SKView.SKViewAppearance

パラメーター

戻り値

適用対象

GetAppearance<T>()

SKView のサブクラスの外観プロキシ SKView.SKViewAppearance を取得します。

public static SpriteKit.SKView.SKViewAppearance GetAppearance<T> () where T : SpriteKit.SKView;
static member GetAppearance : unit -> SpriteKit.SKView.SKViewAppearance (requires 'T :> SpriteKit.SKView)

型パラメーター

T

UIAppearance プロキシを返す必要がある型。 これは SKView のサブクラスです。

戻り値

指定した型の外観プロキシ オブジェクト。

注釈

返されるオブジェクトに外観プロパティを設定すると、型パラメーターのすべてのクラスとサブクラスの外観に影響します。

AppearanceプロパティやAppearanceWhenContainedIn(Type[])、この特定のクラスのインスタンスでのみ動作するメソッドとは異なり、GetAppearance によって返されるプロキシを使用してサブクラスのスタイルを変更できます。

次の例は、GetAppearance メソッドのしくみを示しています

var myTheme = SKView.GetAppearance<MySKViewSubclass> ();
myTheme.TintColor = UIColor.Red;

詳細については、UIAppearance クラスのドキュメントをご覧ください。

適用対象

GetAppearance<T>(UITraitCollection)

SKView のサブクラスの外観プロキシ SKView.SKViewAppearance を取得します。

public static SpriteKit.SKView.SKViewAppearance GetAppearance<T> (UIKit.UITraitCollection traits) where T : SpriteKit.SKView;
static member GetAppearance : UIKit.UITraitCollection -> SpriteKit.SKView.SKViewAppearance (requires 'T :> SpriteKit.SKView)

型パラメーター

T

UIAppearance プロキシを返す必要がある型。 これは SKView のサブクラスです。

パラメーター

traits
UITraitCollection

一致する特徴コレクション。

戻り値

指定した型の外観プロキシ オブジェクト。

注釈

返されるオブジェクトは、開発者が SKView のインスタンスの外観プロパティを設定できる UIAppearance プロキシを表します。

AppearanceプロパティやAppearanceWhenContainedIn(Type[])、この特定のクラスのインスタンスでのみ動作するメソッドとは異なり、GetAppearance によって返されるプロキシを使用してサブクラスのスタイルを変更できます。

次の例は、GetAppearance メソッドのしくみを示しています

var myTheme = SKView.GetAppearance<MySKViewSubclass> (myTraits, );
myTheme.TintColor = UIColor.Red;

詳細については、UIAppearance クラスのドキュメントをご覧ください。

適用対象

GetAppearance<T>(UITraitCollection, Type[])

ビューが指定された階層でホストされている場合に、指定した特性コレクションを持つ SKView のサブクラスの外観プロキシ SKView.SKViewAppearance を取得します。

public static SpriteKit.SKView.SKViewAppearance GetAppearance<T> (UIKit.UITraitCollection traits, params Type[] containers) where T : SpriteKit.SKView;
static member GetAppearance : UIKit.UITraitCollection * Type[] -> SpriteKit.SKView.SKViewAppearance (requires 'T :> SpriteKit.SKView)

型パラメーター

T

UIAppearance プロキシを返す必要がある型。 これは SKView のサブクラスです。

パラメーター

traits
UITraitCollection

一致する特徴コレクション。

containers
Type[]

この特定の外観を適用するコンテナーとして開発者が必要とする型の一覧。

戻り値

指定した型の外観プロキシ オブジェクト。

注釈

返されるオブジェクトは UIAppearance プロキシを表します。このプロキシでは、開発者は、 パラメーターで指定された階層にビューが含まれている場合に、指定した階層でビューがホストされている場合に、指定された特性コレクションを持つ SKView のインスタンスの外観プロパティを containers 設定できます。

AppearanceプロパティやAppearanceWhenContainedIn(Type[])、この特定のクラスのインスタンスでのみ動作するメソッドとは異なり、GetAppearance によって返されるプロキシを使用してサブクラスのスタイルを変更できます。

次の例は、GetAppearance メソッドのしくみを示しています

var myTheme = SKView.GetAppearance<MySKViewSubclass> (myTraits, typeof (UINavigationBar), typeof (UIPopoverController));
myTheme.TintColor = UIColor.Red;

詳細については、UIAppearance クラスのドキュメントをご覧ください。

適用対象