I have a UITextField in the first view, I have to store the text and retrieve onto the next view. Who can help me with this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should look into delegates. It allows one view to provide a callback to another view without creating tight coupling.
http://www.theappcodeblog.com/2011/04/15/passing-data-between-views-tutorial-using-a-protocol-delegate-in-your-iphone-app/
What exactly does delegate do in xcode ios project?
Another option is to create a shared model (read up on model view controller patterns). It’s typical in that pattern to create a model and share data by getting a singleton instance of your model: