Edit

Share via


UIColor.FromName Method

Definition

Overloads

FromName(String)

Creates and returns a new color object from the asset with the specified name, with the gamut in the specified asset.

FromName(String, NSBundle, UITraitCollection)

Creates and returns a new color object from the asset with the specified name in the specified bundle, with the gamut in the specified trait collection.

FromName(String)

Creates and returns a new color object from the asset with the specified name, with the gamut in the specified asset.

[Foundation.Export("colorNamed:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static UIKit.UIColor FromName (string name);
static member FromName : string -> UIKit.UIColor

Parameters

name
String

The name of a color asset in the application bundle.

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to

FromName(String, NSBundle, UITraitCollection)

Creates and returns a new color object from the asset with the specified name in the specified bundle, with the gamut in the specified trait collection.

[Foundation.Export("colorNamed:inBundle:compatibleWithTraitCollection:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static UIKit.UIColor FromName (string name, Foundation.NSBundle inBundle, UIKit.UITraitCollection compatibleWithTraitCollection);
static member FromName : string * Foundation.NSBundle * UIKit.UITraitCollection -> UIKit.UIColor

Parameters

name
String

The name of a color asset.

inBundle
NSBundle

The bundle that contains the named color asset.

This parameter can be null.

compatibleWithTraitCollection
UITraitCollection

The trait collection that specifies the gamut.

This parameter can be null.

Returns

Attributes

Remarks

(More documentation for this node is coming)

This can be used from a background thread.

Applies to