I’m confused about how to implement a specific piece of an app. The data is being collected in a Grouped Table, but certain rows drill down to another screen to allow the user to choose something. So for example, I would have
Name:
Surname:
Age:
How do I get this Age value back to the first view when the user taps done ?
I am creating a Person core-data entity when the user saves the first screen that persists all of this data, but that doesn’t exist when the user navigates to the second view. It cannot exist as Name and Surname are required fields, so I cannot save the core-data entity unless these already exist.
Is there any way for a view to return a data type to an earlier view in the navigation tree ?
Thanks in advance,
First option:
pass it as a parameter in a custom init method
Second option:
Declare your CoreData variables in your AppDelegate and access in your views by using