共用方式為


UIColor.FromName 方法

定義

多載

FromName(String)

使用指定之資產中的 gamut,從具有指定名稱的資產建立並傳回新的色彩物件。

FromName(String, NSBundle, UITraitCollection)

使用指定特徵集合中的指定名稱,從資產建立並傳回新的色彩物件。

FromName(String)

使用指定之資產中的 gamut,從具有指定名稱的資產建立並傳回新的色彩物件。

[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

參數

name
String

應用程式套件組合中色彩資產的名稱。

傳回

屬性

備註

(即將推出此節點的更多檔)

這可從背景執行緒使用。

適用於

FromName(String, NSBundle, UITraitCollection)

使用指定特徵集合中的指定名稱,從資產建立並傳回新的色彩物件。

[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

參數

name
String

色彩資產的名稱。

inBundle
NSBundle

包含具名色彩資產的套件組合。

這個參數可以是 null

compatibleWithTraitCollection
UITraitCollection

指定 gamut 的特徵集合。

這個參數可以是 null

傳回

屬性

備註

(即將推出此節點的更多檔)

這可從背景執行緒使用。

適用於