NSMutableAttributedString.AddAttribute(NSString, NSObject, NSRange) NSMutableAttributedString.AddAttribute(NSString, NSObject, NSRange) Method

Definition

Adds an attribute and its value to the specified range of characters in the string.

[Foundation.Export("addAttribute:value:range:")]
public virtual void AddAttribute (Foundation.NSString attributeName, Foundation.NSObject value, Foundation.NSRange range);
abstract member AddAttribute : Foundation.NSString * Foundation.NSObject * Foundation.NSRange -> unit
override this.AddAttribute : Foundation.NSString * Foundation.NSObject * Foundation.NSRange -> unit

Parameters

attributeName
NSString NSString

Attribute name (for example, "color")

value
NSObject NSObject

Attribute value (for example "blue").

range
NSRange NSRange

Range to which the attribute will be applied.

Remarks

The attributeName should be a property in UIStringAttributeKey.

Applies to