Fogmeister Fogmeister - 1 month ago 9
Objective-C Question

performSegue:withSender: sender object

Just wondering about the sender object.

I know that you can access it in the method

prepareForSegue...
but is it available at all in the next
destinationViewController
?

i.e. in the
viewDidLoad
could I access a
segueSender
object or something?

I haven't ever seen this in documentation I just thought it might be useful.

EDIT FOR CLARITY

I'm not asking how to perform a segue or find a segue or anything like this.

Say I have two view controllers (VCA and VCB).

There is a segue from VCA to VCB with the identifier "segue".

In VCA I run...

[self performSegueWithIdentifier:@"segue" sender:@"Hello world"];


My question is can I access the @"Hello world" string from VCB or is it only available in the
prepareForSegue...
method inside VCA?

i.e. can I access the segue sender object from the destination controller?

Answer

So the answer is "No".

Thanks for the help.