apple-text-textkit1-ref

Reference TextKit 1 APIs for NSTextStorage, NSLayoutManager, and NSTextContainer.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sitapix/apple-text --skill apple-text-textkit1-ref
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apple-text-textkit1-ref
Source: https://github.com/sitapix/apple-text/tree/main/skills/apple-text-textkit1-ref
Command: npx skills add https://github.com/sitapix/apple-text --skill apple-text-textkit1-ref

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TextKit 1 Reference guides developers who need exact API signatures, lifecycle details, and architecture guidance for NSLayoutManager, NSTextStorage, and NSTextContainer, enabling maintenance of legacy TextKit 1 code and precise debugging.

Core Features & Use Cases

  • Comprehensive API reference for NSTextStorage, NSLayoutManager, and NSTextContainer.
  • Detailed editing lifecycle, glyph handling, and temporary attributes guidance for TextKit 1.
  • Use Case: maintain and debug legacy TextKit 1 apps or plan migration to TextKit 2.

Quick Start

Look up the NSTextStorage lifecycle and NSLayoutManager APIs to debug a legacy TextKit 1 issue.

Frequently Asked Questions about apple-text-textkit1-ref

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the NSTextStorage editing lifecycle work in TextKit 1?

The NSTextStorage editing lifecycle in TextKit 1 coordinates text mutations with layout updates, ensuring NSLayoutManager processes glyph generation only after character changes are finalized to prevent layout inconsistencies.

How do I debug glyph-to-character mapping issues using NSLayoutManager?

Debug glyph-to-character mapping issues in NSLayoutManager by referencing exact TextKit 1 API signatures to trace glyph generation, validate temporary attributes, and inspect multi-container layout constraints.

What is the best way to maintain legacy TextKit 1 apps before migrating?

Maintain legacy TextKit 1 apps by referencing exact API signatures and architecture guidance for NSTextStorage, NSLayoutManager, and NSTextContainer to resolve layout bugs and stabilize older code paths.

Can I use NSTextContainer to handle multi-container layouts in TextKit 1?

Yes, NSTextContainer supports multi-container layouts in TextKit 1 by defining regions for text rendering, working with NSLayoutManager to flow glyphs across distinct container boundaries and manage complex pagination.

Why does my NSLayoutManager layout break when applying temporary attributes?

NSLayoutManager layout breaks with temporary attributes when TextKit 1 lifecycle rules are violated, requiring precise API coordination to ensure attributes apply without triggering unexpected glyph invalidation or layout loops.