UITraitCollection.FromUserInterfaceStyle(UIUserInterfaceStyle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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