NSButton.ButtonType.toggle
A button that switches between its normal and alternate content on each click.
Declaration
case toggleDiscussion
When the value of state is off, the button displays its normal content, such as its image or title. When state has any other value, the button displays its alternate content, such as its alternateImage or alternateTitle instead. If the button has no alternate content to display, it may instead draw its normal content using an illuminated effect.
This type of button is best for controlling a Boolean state within your application, while also providing a visual indication of that state.
This option corresponds to the Toggle type in Interface Builder’s Attributes Inspector.