Search code examples
xcodecocoainterface-builderappkitnsbutton

How can I keep one NSButton as pressed after click on it?


I have one NSButton and I want when I pressed it to stay as pressed.

enter image description here


Solution

  • If those are really NSButtons, then open the xib in Xcode, click on the button, go to the "Attributes" pane, and change the "Type" of the button to "Push On Push Off". That makes it "sticky".