In the Xcode storyboard, I am trying to connect an IBAction from the ViewController to a menu item in the application scene (menu bar).
I found a solution saying that I should connect the menu item to the first responder. Then the first responder to IBAction, since the first responder represents in all the scenes. Thus, the first responder can get the action from the menu bar first as zero, and then bind it to IBAction.
However, I cannot understand how to connect the menu item to the first responder and the first responder to IBAction. When I press Ctrl + drag the menu item in First Responder, it shows only the predefined actions. And I cannot ctrl + drag the ViewController in the First Responder onto the viewController scene in general.
How to connect IBAction and menu item to the first responder?
source
share