Ios Swift TableView cleared when returning screen

0

I'm implementing two screens ... at first I have a tableview a when I click on one of the cells, I send data to the second screen ...

But when I click on the back button which is a follows for the first screen ... the data I loaded in the tableView, are lost ...

How do I return the first screen without changing the data that is in the tableview?

Thank you

    
asked by anonymous 02.03.2016 / 15:53

1 answer

0

As I understand it, you're using another follow to get back to the page. This causes me to recreate the page again, giving start in viewDidLoad if I'm not mistaken. Since you do not have images of your code, I'm assuming you're using the reloadData of the table in viewDidLoad. That's why you're re-creating the table again. I suggest you study navigation between screens. An example would be the dismissViewControllerAnimated , using to go back to the previous page.

    
30.03.2016 / 00:52