---
title: cellClass
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsmatrix/cellclass
---

# cellClass

The subclass of NSCell that the matrix uses when creating new (empty) cells.

## Declaration

```swift
var cellClass: AnyClass { get set }
```

## Discussion

Discussion The value of this property should be the id of a subclass of NSCell, which can be obtained by sending the class message to either the NSCell subclass object or to an instance of that subclass. The default cell class is that set with the class method setCellClass(_:), or NSActionCell if no other default cell class has been specified. You need to use this property only with matrices initialized with init(frame:), because the other initializers allow you to specify an instance-specific cell class or cell prototype.

## See Also

### Related Documentation

- [insertColumn(_:)](appkit/nsmatrix/insertcolumn(_:).md)
- [addRow()](appkit/nsmatrix/addrow().md)
- [addColumn()](appkit/nsmatrix/addcolumn().md)
- [insertRow(_:)](appkit/nsmatrix/insertrow(_:).md)
- [makeCell(atRow:column:)](appkit/nsmatrix/makecell(atrow:column:).md)

### Managing the Cell Class

- [prototype](appkit/nsmatrix/prototype.md)
