UILabel.AttributedText Свойство

Определение

Задает текст для метки, используя строки с атрибутами.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual Foundation.NSAttributedString AttributedText { [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("attributedText", ObjCRuntime.ArgumentSemantic.Copy)] get; [ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)] [Foundation.Export("setAttributedText:", ObjCRuntime.ArgumentSemantic.Copy)] set; }
member this.AttributedText : Foundation.NSAttributedString with get, set

Значение свойства

Текст с атрибутом.

Это значение может быть равно null.

Атрибуты

Комментарии

var title = new NSAttributedString (
    "Hello, World",
    font: UIFont.FromName ("HoeflerText-Regular", 24.0f),
    foregroundColor: UIColor.Red,
    strokeWidth: 4
);
myLabel.SetAttributedTitle (title, UIControlState.Normal);

Применяется к