Mac Storyboard Show Segues Involve Window Controllers

October 11th, 2015

Filed under: Cocoa, Mac Development | Be the first to comment!

I struggled with how to pass data between view controllers in a Mac storyboard show segue so I’m detailing how I solved the problem here. I hope it helps others who have a similar problem. Short version: a show segue involves window controllers, not view controllers. Implement prepareForSegue in a NSWindowController subclass. Background I’m writing […]


Connecting Menu Items to IBActions in a Mac Storyboard

February 23rd, 2015

Filed under: Cocoa, Interface Builder, Mac Development | 6 comments

A common pattern in Mac application development is to create a menu item, create an IBAction for that item in one of your classes, and connect the menu item to the IBAction. When the person running your application chooses that menu item, your application performs the IBAction. If you’re using storyboards to develop your Mac […]