Magic Words – Harnessing the Power of TextKit
summary
TextKit is presented as the practical stack that makes rich editable text, custom layout and inline media possible: code uses NSTextStorage, NSLayoutManager, NSTextContainer to build a multi‑column magazine with exclusion paths, place images, and attach embedded audio attributes (and guitar chord callouts) to ranges. A working demo in Objective‑C shows glyph mapping, layout manager delegates and custom text storage, but UIKit integration is fiddly — UITextView delegate callbacks can be unpredictable and getting it robust takes a lot of extra work.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:38Teleprompt+
- 1:40Super-Brief History of Text on iOS
- 5:00What is Text Kit?
- 5:56What is a Glyph?
- 6:48Glyph Mapping
- 7:14Architecture
- 7:49Relationships
- 11:15Layout Process
- 12:04Customizing Layout and Behavior
- 12:20Subclassing NSTextStorage
- 12:59Subclassing NSTextContainer
- 13:49Subclassing NSLayoutManager
- 14:10NSLayoutManagerDelegate
- 16:17Working With Text Kit
- 17:14Business Use Case
- 17:56Multiple Text Containers
- 23:59Exclusion Path(s)
- 26:59NSAttributedString Class
- 27:31Custom Attributes!
- 37:19Hit Testing
- 38:45Beware of UlTextView!








