Instance Method

ensureAttributesAreFixed(in:)

Ensures that attributes are fixed in the given range.

Declaration

func ensureAttributesAreFixed(in range: NSRange)

Parameters

range

The range of characters whose attributes might be examined.

Discussion

An NSTextStorage object using lazy attribute fixing is required to call this method before accessing any attributes within range. This method gives attribute fixing a chance to occur if necessary. NSTextStorage subclasses wishing to support laziness must call this method from all attribute accessors they implement.

See Also

Fixing the String Attributes

func invalidateAttributes(in: NSRange)

Invalidates attributes in the specified range.

var fixesAttributesLazily: Bool

A Boolean value indicating whether the text storage object fixes attributes lazily.