I am in a viewController, lets call it vcA and I call a second one vcB, using
[self presentModalViewController:vcB animated:YES];
once vcB is loaded is there any way to obtain a reference to vcA?
Yes, I know that I can subclass vcB and add a property to it. I am just asking if there is some native iOS method/property/whatever that already does that.
I am on a navigationController app.
Thanks.
If it’s for single fire use and there is not a lot of collaboration I tend to prefer blocks over delegation as it’s seems a bit tidier.
For example if it was just to call back when you have finished using the secondViewController I would:
Add a block property to the SecondViewController
Then in the firstViewController when you create the secondViewController
Then in the secondViewController when you are finished
If you need a return value then just modify the block to accept an argument