---
title: selectedCell()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nscontrol/selectedcell()
---

# selectedCell()

Returns the receiver’s selected cell.

## Declaration

```swift
func selectedCell() -> NSCell?
```

## Return Value

Return Value The selected cell object.

## Discussion

Discussion The default implementation of this method simply returns the control’s associated cell (or nil if no cell has been set). Subclasses of NSControl that manage multiple cells (such as NSMatrix and NSForm) must override this method to return the cell selected by the user.

## See Also

### Related Documentation

- [cell](appkit/nscontrol/cell.md)

### Deprecated Methods

- [selectedTag()](appkit/nscontrol/selectedtag().md)
- [setNeedsDisplay()](appkit/nscontrol/setneedsdisplay().md)
- [calcSize()](appkit/nscontrol/calcsize().md)
- [selectCell(_:)](appkit/nscontrol/selectcell(_:).md)
- [drawCell(_:)](appkit/nscontrol/drawcell(_:).md)
- [drawCellInside(_:)](appkit/nscontrol/drawcellinside(_:).md)
- [updateCell(_:)](appkit/nscontrol/updatecell(_:).md)
- [updateCellInside(_:)](appkit/nscontrol/updatecellinside(_:).md)
