次の方法で共有


MTKView.GetAppearance メソッド

定義

オーバーロード

GetAppearance(UITraitCollection)

ビューの外観特性コレクションを取得します。

GetAppearance(UITraitCollection, Type[])

ビューの外観特性コレクションを取得します。

GetAppearance<T>(UITraitCollection, Type[])

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

GetAppearance<T>(UITraitCollection)

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

GetAppearance<T>()

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

GetAppearance(UITraitCollection)

ビューの外観特性コレクションを取得します。

public static MetalKit.MTKView.MTKViewAppearance GetAppearance (UIKit.UITraitCollection traits);
static member GetAppearance : UIKit.UITraitCollection -> MetalKit.MTKView.MTKViewAppearance

パラメーター

戻り値

適用対象

GetAppearance(UITraitCollection, Type[])

ビューの外観特性コレクションを取得します。

public static MetalKit.MTKView.MTKViewAppearance GetAppearance (UIKit.UITraitCollection traits, params Type[] containers);
static member GetAppearance : UIKit.UITraitCollection * Type[] -> MetalKit.MTKView.MTKViewAppearance

パラメーター

containers
Type[]

戻り値

適用対象

GetAppearance<T>(UITraitCollection, Type[])

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

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

型パラメーター

T

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

パラメーター

traits
UITraitCollection

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

containers
Type[]

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

戻り値

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

注釈

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

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

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

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

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

適用対象

GetAppearance<T>(UITraitCollection)

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

public static MetalKit.MTKView.MTKViewAppearance GetAppearance<T> (UIKit.UITraitCollection traits) where T : MetalKit.MTKView;
static member GetAppearance : UIKit.UITraitCollection -> MetalKit.MTKView.MTKViewAppearance (requires 'T :> MetalKit.MTKView)

型パラメーター

T

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

パラメーター

traits
UITraitCollection

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

戻り値

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

注釈

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

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

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

var myTheme = MTKView.GetAppearance<MyMTKViewSubclass> (myTraits, );
myTheme.TintColor = UIColor.Red;

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

適用対象

GetAppearance<T>()

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

public static MetalKit.MTKView.MTKViewAppearance GetAppearance<T> () where T : MetalKit.MTKView;
static member GetAppearance : unit -> MetalKit.MTKView.MTKViewAppearance (requires 'T :> MetalKit.MTKView)

型パラメーター

T

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

戻り値

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

注釈

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

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

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

var myTheme = MTKView.GetAppearance<MyMTKViewSubclass> ();
myTheme.TintColor = UIColor.Red;

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

適用対象