Vesper Mac Diary #6 - prepareForSegue bug, maybe

This is either a bug, a misunderstanding on my part, or an error on my part. Though I don’t know if this is a bug or not, I decided it was worth filing just in case it’s a bug.

(rdar://17567823.)

You can download the sample project: PrepareForSegueTest.zip.

Here’s what’s happening:

  • It’s an OS X app with a storyboard.

  • The window has a containment segue to an NSSplitViewController.

  • The NSSplitViewController has two containment segues, one for each split view item.

  • prepareForSegue:​sender: is not called on either the window controller subclass or split view controller subclass. I can verify that both subclasses are in fact used (via an NSLog in initWithCoder: in each).

Is prepareForSegue not meant to be called in these cases? I have little experience with storyboards until now, but I would have expected that it would always get called, since it may be necessary for a parent to set some properties on the child, and this seems to be the place to do it.

05 Jul 2014

Archive