I have a view controller that pushes to another page on the same class. All data entered into the text fields on the new page vanishes as soon as I move away form it. Im assuming im missing a step here somewhere?
Do I have to connected something in page to to my original view controller?
Otherwise im going to have one long page at this rate.
xcode 4.3
I think I understand what you are saying. You have a screen that calls another screen. You call the new screen and enter data on that new screen and then navigate back to the original screen. Then you call the second screen again and the data is now missing.
Each time you call a screen you create a new UIViewController (or a subclass of that class) object. It only knows what you tell it when you create it and afterward. When you navigate back to the original screen the new screen’s view controller is destroyed and all data in it unless you store the data back in the “model” (MVC) or original screen. So if you need to have the new screen show the data that was entered into it a previous time you will need to store that information in the “model” of your application or the screen that calls it. Then when you call the new screen “push” the stored data back into it.
If you are unfamiliar with the “Model” in Apple’s Model-View-Controller pattern here is a good reference. Apple MVC
Hope this helps