setButtonType(_:)
Sets how the button highlights while pressed and how it shows its state.
Declaration
func setButtonType(_ type: NSButton.ButtonType)Parameters
- type:
A constant specifying the type of button. This can be one of the constants defined in Buttontype.
Discussion
The setButtonType(_:) method redisplays the button before returning.
The types available are for the most common button types, which are also accessible in Interface Builder; you can configure different behavior with the highlightsBy and showsStateBy properties.
Note that there is no -buttonType method. The set method sets various button properties that together establish the behavior of the type.