Reputation: 2055
I know how to do it programatically, creating a menu and adding menu items and then assigning selector to it and eventually calling a function. But what i am not able to figure out is how do i execute a function when an NSMenuItem was added using Story Board.
All i want to do is when i click on "New ITEM" a function is called on the current controller.
Can you please suggest or point me to an example?
Upvotes: 3
Views: 1734
Reputation: 285170
If the controller is in the responder chain hierarchy send the action to First Responder
(the red cube). The method appears in the list if it's implemented in one of the responder chain objects.
Upvotes: 2