Issue with passing data backwards/no option for delegates

I ran into an issue tonight that has me halted on development of my app. I have a screen that comes up and displays information. There is a button in that screen that opens another screen which is “shared” meaning i use it in another part of the app and have a boolean so it knows where its coming from.

This other screen is a date picker and when I select a date, I need to update a label in the previous screen with the new date as well as unhide a view. I have tried creating the previous view as “new” (with the red) as you showed me earlier and it did not work, I also tried it as a singleton and that also did not work. I know that this type of behavior can be done in Xcode using Delegates and Protocols, but I don’t know how to do this in your program.

Lastly related to this problem, I have screen A that is a navigation controller in a tabbar, then I press a button on A to go to screen B also which is presented modally (to cover the tabbar), and then on screen B I press a button to present screen C modally. I update data/run a function on Screen c, but there is no way to dismiss screen C AND screen be and go back to A. I have “pop screen animated” but it only goes from C back B, not C to A. I had it specifically navigating back to the TabBar as the only way for this to work. Please advise on how to fix this as I have several other screens like this that I am also stuck on. Here is an example:

Hi
it is possible by using a Screen Property (like delegates)
I prepared a video showing the whole process.

Thank you so much for this, it is extremely helpful. I was on the right track, but you clarified everything perfectly for me. I will attempt this in my app and let you know If I have any more issues.

1 Like

One thing I forgot, is how to I close 2 screens at once? Your video showed me how to close one screen, but not 2 at the same time?

You will need to call the dismiss on the middle Screen.

So put a function on the middle (2nd) screen that I call from the 3rd screen?

I have tested this as you did it an it works perfectly, thank you!

1 Like