Contents

NSButton.ButtonType.momentaryPushIn

A button that illuminates when the user clicks it.

Declaration

case momentaryPushIn

Discussion

This button type is the default.

This type of button is best for simply triggering actions, as it doesn’t show its state; it always displays its normal image or title.

Most buttons in macOS, such as the Cancel button in many dialogs, are momentary light buttons. If a user clicks one, it highlights briefly, triggers an action, and returns to its original state.

This option corresponds to the Momentary Push In type in Interface Builder’s Attributes Inspector.

See Also

Configuring Button Behavior