Replaces the NSText
object for the group of text-system objects containing the receiver with the given text storage object.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
func replaceTextStorage(_ newTextStorage: NSText Storage)
Parameters
newTextStorage
The text storage object to set.
Discussion
All NSLayout
objects sharing the original NSText
object then share the new one. This method makes all the adjustments necessary to keep these relationships intact, unlike text
.