<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSTextTableBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextTableBlock"
  },
  "title" : "NSTextTableBlock"
}
-->

# NSTextTableBlock

A text block that represents a single cell in a text table.

```
class NSTextTableBlock
```

## Overview

`NSTextTableBlock` is a subclass of [`NSTextBlock`](/documentation/UIKit/NSTextBlock) that places a paragraph in a cell of an [`NSTextTable`](/documentation/UIKit/NSTextTable). When you create an `NSTextTableBlock`, you specify the table it belongs to, the cell’s starting row and column, and how many rows and columns the cell spans.

To build a table, create an [`NSTextTable`](/documentation/UIKit/NSTextTable), then create an `NSTextTableBlock` for each cell. Assign each block to a paragraph by setting [`textBlocks`](/documentation/UIKit/NSParagraphStyle/textBlocks) on an [`NSMutableParagraphStyle`](/documentation/UIKit/NSMutableParagraphStyle) and applying that style to the paragraph’s range in your attributed string.

## Topics

### Creating a text table block

[`-  initWithTable:startingRow:rowSpan:startingColumn:columnSpan:`](/documentation/UIKit/NSTextTableBlock/init(table:startingRow:rowSpan:startingColumn:columnSpan:))

[`-  initWithCoder:`](/documentation/UIKit/NSTextTableBlock/init(coder:))

### Accessing the parent table

[`table`](/documentation/UIKit/NSTextTableBlock/table)

### Accessing cell position

[`startingRow`](/documentation/UIKit/NSTextTableBlock/startingRow)

[`rowSpan`](/documentation/UIKit/NSTextTableBlock/rowSpan)

[`startingColumn`](/documentation/UIKit/NSTextTableBlock/startingColumn)

[`columnSpan`](/documentation/UIKit/NSTextTableBlock/columnSpan)

## Relationships

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Sendable`](/documentation/Swift/Sendable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSTextBlock`](/documentation/UIKit/NSTextBlock)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)