apple-text-storage

Community

Master NSTextStorage and TextKit 2 storage

Authorsitapix
Version1.0.0
Installs0

System Documentation

What problem does it solve?

TextKit storage layers can be difficult to design and debug. This guide clarifies the architecture and lifecycle of NSTextStorage, NSTextContentStorage, and NSTextContentManager, including how they interact and how to reason about backing stores.

Core Features & Use Cases

  • Understand TextKit 1 and 2 storage models (backing stores, elements, and layout callbacks)
  • Learn subclassing NSTextStorage, implementing the editing lifecycle (beginEditing/edited/processEditing) and maintaining string/attributes consistency
  • Bridge to NSTextContentStorage and NSTextContentManager, including paragraph element generation and content synchronization
  • Apply best practices for batching edits, thread-safety, and common pitfalls like changeInLength correctness

Quick Start

Start by reviewing the storage architecture and implement a minimal NSTextStorage subclass with proper edited calls.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: apple-text-storage
Download link: https://github.com/sitapix/apple-text/archive/main.zip#apple-text-storage

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.