menu item is enabled, but still grayed out

前端 未结 3 616
-上瘾入骨i
-上瘾入骨i 2021-02-07 12:44

I have a menu with several items created in interface builder. It looks fine there and \'enabled\' is checked.
But when I run application, all menu items are grayed out.

3条回答
  •  野性不改
    2021-02-07 13:08

    In case somebody might google this out and benefit, 'Action' method was declared without :(id)sender parameter:

    -(IBAction) quit;
    

    Strangely, setAction method in NSMenuItem ate it and didn't complain. Oh well.

提交回复
热议问题