Q:

Data is unloaded from View Controller when segue happens

I have two screens that I am performing a push segue between. In the first screen, there are 5 buttons that you click on to send you to the next page. On the next page, you edit some information that is specific to each button, then you click a button and get sent back to the first screen. (Kind of like editing contacts) When I edit one button it works perfectly. However, when I click on the next button and edit its information, when I come back the original screen has lost the information about the first button. Just to be clear, I am not actually editing the button. There is information that is being displayed on the button, but I am storing data in some properties on the view controller.

I think the problem is that the data stored in the properties is being cleared when I perform the segue. How can I make it so that the data persists?

A:

Thanks to @rdelmar, I am now using a modal segue from the first view. I then use dismissViewControllerAnimated to go back. (Found in this question.)

