Cocoa Text System Overview

The Cocoa Text System, aka “Text Kit” on iOS.

This revolves around everything related to accepting textual user input on the Mac: NSTextView for the UI component, NSTextStorage for the processing of text and style changes, NSLayoutManager for the computation of line and glyph sizes, and for applying styles, NSTypesetter for putting glyphs on the screen. Even NSTextFields are just reusing a shared NSTextView as the field editor. It’s everywhere.

Relevant Posts

Oct 19 2019 Fix Missing Font Fallbacks for NSTextView
Jun 23 2018 NSTextField usesSingleLineMode Stops Working When You Implement NSTextViewDelegate Methods
Apr 24 2018 RxSwift: Typing/Idle Event Stream for NSTextView
Mar 7 2018 NSTextView’s Default Insertion Point and Selected Text Colors
Feb 6 2018 NSTextView: When Did the Find Bar Disappear?
Nov 29 2017 Why the Selection Changes When You Do Syntax Highlighting in a NSTextView and What You Can Do About It
Aug 9 2017 Show a fat iOS-Style Insertion Point in NSTextView
Jul 15 2017 Setting the NSTextView Line Height in a Beautiful Way
Jul 11 2017 Typewriter Mode: Adding Overscrolling to the Text View
Mar 3 2017 Setting the Line Height of a NSTextView