how to enable/disable NSToolbarItem

前端 未结 4 1122
陌清茗
陌清茗 2021-01-04 13:39

I have a project that needs to disable/enable some NSToolbarItems depends on different options. I checked and found no parameter for this.

Is there a wa

4条回答
  •  旧巷少年郎
    2021-01-04 14:13

    As nsij22 said you need to set action.

    In Storyboard just ctrl+drag from toolbar item to your code action.

提交回复
热议问题