UITraitCollection.FromUserInterfaceStyle(UIUserInterfaceStyle) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建新的特征集合并将其与指定的用户界面样式相关联。
[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
参数
- userInterfaceStyle
- UIUserInterfaceStyle
要与新特征集合关联的用户界面样式。
返回
与指定的用户界面样式关联的新特征集合。
- 属性