Re: Mac containment segues, and prepareForSegue
Re: Mac containment segues, and prepareForSegue
- Subject: Re: Mac containment segues, and prepareForSegue
- From: Roland King <email@hidden>
- Date: Tue, 28 Oct 2014 15:47:22 +0800
> On 28 Oct 2014, at 11:40 am, Fritz Anderson <email@hidden> wrote:
>
> I'm glad of the correction.
>
> Yes, I am speaking exactly about the "relationship" link between
>the window in a window controller scene and the view in the view controller
>as provided in the template's Main.storyboard.
>
> I think it absurd that there is no obvious way for a document class that
>loads that window controller to get at the contents of the vote controller,
>even to the extent of passing on a Core Data context.
>
> It being absurd, it's evident I'm missing something embarrassingly obvious.
>
> [Top-posted because I'm using my iPhone]
I just watched the WWDC video you were talking about, had an hour in the gym with
nothing better to do. That video of course uses different terminology from
everything else I’ve seen before, however if you watch the piece where they first
talk about prepareForSegue and listen carefully to what’s being said and how it’s
being compared to iOS, I’m pretty sure that they are only talking about
*presentation* segues, not the ones at the top of the slide which they call
*containment* segues.
later in the talk they first talk about their containment stuff, like splitview etc,
and they don’t mention any prepareForSegue on that, then they talk about
“Triggered” segues, and those are the ones which have identifiers and which use
prepareForSegue. Those are the popover, modal etc etc. segues.
Just to make things a little more complicated, there is such a thing as a Container
View Controller (you can drag it out of the well and dump it on a storyboard), that
has an Embed segue which does have settable name and does call prepareForSegue.
So if you write your own containers, you get the call, I have.
So from all that I deduce that what in that video is called ‘containment’ actually
appears on storyboards called ‘relationships’ and are segues in name-only, they don’t
trigger prepareFromSegue, you can’t name them, they are lines on the storyboard.
The segues which are real, and cause actions and can be hooked into are the triggered
segues which cause popups and modal windows etc. Those you can name, those you
get the callback for.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden