i know how to set up a "normal" delegation between to ViewController, which are directly dependent. So if i say, i have to send a message from one view to its upper one, i know how to do this. But how do i set up a delegate, if there are more ViewControllers between the two?
So m let's say i have this setup according to the scheme:
ViewController1 -> ViewController2 -> ViewController3 (via ButtonPressed) (via ButtonPressed)
If i want to set a (for example) NSString in VC1 from VC2, i just write into the prepareForSegue, where i call the VC2:
VC2.delegate = self;
But what do i do when i want to transfer Data between VC3 and VC1 without having to change VC2? What do i set the delegate for, if it isn't "self"? I know my description is very bad, but i cannot describe it better.
I just want this: VC1 has one button and a label; the button opens VC2, which has one button too, but no label; this VC2Button shows VC3; And with a touch to the button in the VC3 i want to change the label in VC1. But without having to set a delegte to VC2 and then another to VC1, i know how this works.
Hope you get what i want.
Thanks in advance!