I am trying to do an app i just stuck with some logic in that app. It contains 10 fields in which user need to enter text in all the fields.After this screen i designed 5 screens which contains labels in all the screens in which the text entered by the user will display in all the screens.
What exactly i need is after user enters the text he chooses one field from 10 fields.
After choosing a field he advances to labels screens in which he need to decide weather he chosen field is there in that screen or not ,the same thing will happen in the rest labels screens also.If the chosen field is there in the particular screen then the user will press a button named YES. In which screen he presses YES button i need to update that buttons in that particular screens and at last i need to get update of that YES buttons . In what ever screen i am getting the update of the button depending on that my result will be displayed.
I Just need how can i update that YES buttons if user presses in the different views so that i can get count of which screen the button is pressed and depending on that i can display result.
Help me in logic of this app. Thanks!
you can try using core data for this,
another approach would be to have an array, composed of dictionaries [to pass around in all your views]
like this:
arrayFields, make it a mutable array
composed of dictionaries with this objects : field and pressed
so you can go checking and setting each object and specify if it has a yes or a no associated with it and act accordingly
good luck!
edit,
you need an array as a property
so in your
Starting1classViewController.h
@property (nonatomic,retain) UITextField *textfield1;
Starting1classViewController.m
create your textFields, and when filled, have a button that assigns the values of the textfields to a dictionary for each textField so, this dictionary goes into the array,
so you pass the array around your views, so you can populate your labels with the data from the array,
modifing the index needed with selected or not,
you just need to know what index is what,
or if you wanted to have the name of each field asociated to the values, you could make a dictionary of dictionaries,
😉