---
title: TextKit
framework: appkit
role: collectionGroup
role_heading: API Collection
path: appkit/textkit
---

# TextKit

Manage text storage and perform custom layout of text-based content in your app’s views.

## Overview

Overview TextKit provides several classes to control the layout of text, such as NSTextContentStorage, NSTextLayoutManager, and NSTextContainer. Additionally, TextKit uses NSAttributedString objects extensively. The NSTextStorage class is a subclass of NSMutableAttributedString, and many of the TextKit classes, for example, the classes listed in Formatted content, focus on creating complex NSAttributedString instances. Use these classes to specify your text’s format. Most of the time, you can use TextKit to fine tune the formatting and layout of a NSTextView by modifying various properties of your view’s layout manager, text container, or text storage objects in your app. If you need more control, you can also use TextKit to build your text controls.

## Topics

### Text management

- [NSTextContentStorage](appkit/nstextcontentstorage.md)
- [NSTextContentManager](appkit/nstextcontentmanager.md)
- [NSAttributedString](foundation/nsattributedstring.md)
- [NSMutableAttributedString](foundation/nsmutableattributedstring.md)

### Formatting and attributes

- [NSParagraphStyle](appkit/nsparagraphstyle.md)
- [NSMutableParagraphStyle](appkit/nsmutableparagraphstyle.md)
- [NSTextTab](appkit/nstexttab.md)
- [NSTextList](appkit/nstextlist.md)
- [NSTextTable](appkit/nstexttable.md)
- [NSTextTableBlock](appkit/nstexttableblock.md)
- [NSTextBlock](appkit/nstextblock.md)

### Content elements

- [Enriching your text in text views](uikit/enriching-your-text-in-text-views.md)
- [NSTextParagraph](appkit/nstextparagraph.md)
- [NSTextListElement](appkit/nstextlistelement.md)
- [NSTextElement](appkit/nstextelement.md)
- [NSTextElementProvider](appkit/nstextelementprovider.md)

### Location and selection

- [NSTextRange](appkit/nstextrange.md)
- [NSTextSelection](appkit/nstextselection.md)
- [NSTextSelectionNavigation](appkit/nstextselectionnavigation.md)
- [NSTextLocation](appkit/nstextlocation.md)

### Layout

- [Using TextKit 2 to interact with text](uikit/using-textkit-2-to-interact-with-text.md)
- [NSTextLayoutManager](appkit/nstextlayoutmanager.md)
- [NSTextContainer](appkit/nstextcontainer.md)
- [NSTextLayoutFragment](appkit/nstextlayoutfragment.md)
- [NSTextLineFragment](appkit/nstextlinefragment.md)
- [NSTextViewportLayoutController](appkit/nstextviewportlayoutcontroller.md)
- [NSTextLayoutOrientationProvider](appkit/nstextlayoutorientationprovider.md)

### Attachments

- [NSTextAttachment](appkit/nstextattachment.md)
- [NSTextAttachmentViewProvider](appkit/nstextattachmentviewprovider.md)
- [NSAdaptiveImageGlyph](appkit/nsadaptiveimageglyph.md)
- [NSTextAttachmentContainer](appkit/nstextattachmentcontainer.md)
- [NSTextAttachmentLayout](appkit/nstextattachmentlayout.md)
- [NSTextAttachmentCell](appkit/nstextattachmentcell-swift.class.md)
- [NSTextAttachmentCellProtocol](appkit/nstextattachmentcellprotocol.md)

### Glyphs

- [NSGlyph](appkit/nsglyph.md)
- [NSGlyphStorage](appkit/nsglyphstorage.md)
- [NSGlyphGenerator](appkit/nsglyphgenerator.md)
- [NSGlyphInfo](appkit/nsglyphinfo.md)
- [Reserved Glyph Codes](appkit/reserved-glyph-codes.md)
- [NSFontRenderingMode](appkit/nsfontrenderingmode.md)

### TextKit 1

- [NSTextStorage](appkit/nstextstorage.md)
- [NSLayoutManager](appkit/nslayoutmanager.md)
- [NSATSTypesetter](appkit/nsatstypesetter.md)
- [NSTypesetter](appkit/nstypesetter.md)

## See Also

### Text

- [Text Display](appkit/text-display.md)
- [Fonts](appkit/fonts.md)
- [Writing Tools](appkit/writing-tools.md)
