UIView.GetAppearance メソッド

定義

オーバーロード

GetAppearance(UITraitCollection)

指定した の外観プロキシを返します traits

GetAppearance(UITraitCollection, Type[])

指定した の外観プロキシを返します traits

GetAppearance<T>()

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

GetAppearance<T>(UITraitCollection)

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

GetAppearance<T>(UITraitCollection, Type[])

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

GetAppearance(UITraitCollection)

指定した の外観プロキシを返します traits

public static UIKit.UIView.UIViewAppearance GetAppearance (UIKit.UITraitCollection traits);
static member GetAppearance : UIKit.UITraitCollection -> UIKit.UIView.UIViewAppearance

パラメーター

戻り値

適用対象

GetAppearance(UITraitCollection, Type[])

指定した の外観プロキシを返します traits

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

パラメーター

containers
Type[]

戻り値

適用対象

GetAppearance<T>()

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

public static UIKit.UIView.UIViewAppearance GetAppearance<T> () where T : UIKit.UIView;
static member GetAppearance : unit -> UIKit.UIView.UIViewAppearance (requires 'T :> UIKit.UIView)

型パラメーター

T

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

戻り値

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

注釈

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

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

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

var myTheme = UIView.GetAppearance<MyUIViewSubclass> ();
myTheme.TintColor = UIColor.Red;

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

適用対象

GetAppearance<T>(UITraitCollection)

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

public static UIKit.UIView.UIViewAppearance GetAppearance<T> (UIKit.UITraitCollection traits) where T : UIKit.UIView;
static member GetAppearance : UIKit.UITraitCollection -> UIKit.UIView.UIViewAppearance (requires 'T :> UIKit.UIView)

型パラメーター

T

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

パラメーター

traits
UITraitCollection

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

戻り値

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

注釈

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

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

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

var myTheme = UIView.GetAppearance<MyUIViewSubclass> (myTraits, );
myTheme.TintColor = UIColor.Red;

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

適用対象

GetAppearance<T>(UITraitCollection, Type[])

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

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

型パラメーター

T

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

パラメーター

traits
UITraitCollection

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

containers
Type[]

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

戻り値

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

注釈

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

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

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

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

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

適用対象