---
title: NSButton.ButtonType.pushOnPushOff
framework: appkit
role: symbol
role_heading: Case
path: appkit/nsbutton/buttontype/pushonpushoff
---

# NSButton.ButtonType.pushOnPushOff

A button that switches between on and off states with each click.

## Declaration

```swift
case pushOnPushOff
```

## Discussion

Discussion When state is on, the button appears illuminated. If the button has borders, it may also appear recessed. A second click returns the button’s state to off. This option corresponds to the Push On Push Off type in Interface Builder’s Attributes Inspector.

## See Also

### Configuring Button Behavior

- [NSButton.ButtonType.momentaryPushIn](appkit/nsbutton/buttontype/momentarypushin.md)
- [NSButton.ButtonType.momentaryLight](appkit/nsbutton/buttontype/momentarylight.md)
- [NSButton.ButtonType.momentaryChange](appkit/nsbutton/buttontype/momentarychange.md)
- [NSButton.ButtonType.onOff](appkit/nsbutton/buttontype/onoff.md)
- [NSButton.ButtonType.toggle](appkit/nsbutton/buttontype/toggle.md)
- [NSButton.ButtonType.switch](appkit/nsbutton/buttontype/switch.md)
- [NSButton.ButtonType.radio](appkit/nsbutton/buttontype/radio.md)
- [NSButton.ButtonType.accelerator](appkit/nsbutton/buttontype/accelerator.md)
- [NSButton.ButtonType.multiLevelAccelerator](appkit/nsbutton/buttontype/multilevelaccelerator.md)
