---
title: setNextState()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nscell/setnextstate()
---

# setNextState()

Changes cell’s state to the next value in the sequence.

## Declaration

```swift
func setNextState()
```

## Discussion

Discussion If a cell has three states, it cycles in this order: on, off, mixed, on, off, and so forth. If the cell has only two states, it toggles between them.

## See Also

### Managing Cell State

- [allowsMixedState](appkit/nscell/allowsmixedstate.md)
- [nextState](appkit/nscell/nextstate.md)
- [state](appkit/nscell/state.md)
- [NSControl.StateValue](appkit/nscontrol/statevalue.md)
