Foundation.NSMutableAttributedString Class
Mutable strings that can be annotated with a set of attributes.

See Also: NSMutableAttributedString Members

Syntax

[Foundation.Register("NSMutableAttributedString", true)]
[ObjCRuntime.Availability(Introduced=ObjCRuntime.Platform.iOS_3_2)]
public class NSMutableAttributedString : NSAttributedString

See Also

UIKit.NSMutableAttributedStringKitAdditions

Remarks

The NSMutableAttributedString holds a mutable string that can has a series of overlapping attributes applied to ranges of the string.

>

Unlike the Foundation.NSAttributedString both the contents of the string as well as the attributes applied to it can be changed after the string has been constructed.

These types typically are used to attach information to elements of the string that dictate the font and colors to use as well as rendering attributes like kerning or how to render ligatures on a specific run of code.

These classes do not dictate the meaning or behavior of the attributes on a string, they merely keep track of the attributes. The actual meaning of these attributes is interpreted by the consumer of these objects.

If you are performing multiple changes to an NSMutableAttributedString, you can optimize the performance by surrounding your changes with calls to Foundation.BeginEditing() and Foundation.EndEditing(). This will prevent the internal data structures to be updated on every change and delay the internal changes until the Foundation.EndEditing() method is called.

Related content

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0