UITraitCollection.FromUserInterfaceStyle(UIUserInterfaceStyle) Method

Definition

Creates a new trait collection and associates it with the specified user interface style.

[Foundation.Export("traitCollectionWithUserInterfaceStyle:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 12, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static UIKit.UITraitCollection FromUserInterfaceStyle (UIKit.UIUserInterfaceStyle userInterfaceStyle);
static member FromUserInterfaceStyle : UIKit.UIUserInterfaceStyle -> UIKit.UITraitCollection

Parameters

userInterfaceStyle
UIUserInterfaceStyle

The user interface style with which to associate the new trait collection.

Returns

A new trait collection associated with the specified user interface style.

Attributes

Applies to