0

Iam trying to set nstoolbar with actions. I did set delegate etc, but when I click to toolbar item with nsbutton as custom view action doesn't work - same without nsbutton.

BUT, when I add breakpoints AND!!!! write in console po button.acttion it does work :D Without "po button.action" I can't handle this action...

IBActions and IBOutlets doesn't work too...

Please help, I rly don't know what is that.

enter image description here

ankmara
  • 265
  • 3
  • 13
  • I tried add under button.target - print(button.target) ... nothing – ankmara Feb 04 '18 at 09:20
  • Are your `button`s going out of scope when you return the toolbar? You could try adding them to a member array like `var buttons = [NSButton]()` – drootang Feb 04 '18 at 19:45
  • Please take a look at this answer, hope it helps. https://stackoverflow.com/a/57912431/7218228 – Juanmi Oct 16 '19 at 22:22

0 Answers0