replaceTextStorage(_:)
Replaces the layout manager’s current text storage object with the specified object.
Declaration
func replaceTextStorage(_ newTextStorage: NSTextStorage)Parameters
- newTextStorage:
The text storage object to set.
Discussion
Use this method to update the text storage uniformly for a group of related layout manager objects. Unlike changing the value in the textStorage property, this method replaces the text storage for all NSLayoutManager objects that share the current layout manager’s NSTextStorage object.