Ios Swift Tableview cleaned when returning the screen

Asked

Viewed 137 times

0

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

However when I click on the back button that is a follow to the first screen...the data I loaded in tableView, are lost...

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

Thank you

  • 4

    How are you calling the second screen and then returning to the first? Post the code so we can help you.

  • You are doing via navigation?

1 answer

0

From what I understand, you’re using another follow to return to the page. This causes you to recreate the page again, starting in viewDidLoad if I’m not mistaken. Since you don’t have images of your code, I’m guessing you’re using the table timeData in viewDidLoad. That’s why you’re recreating the table again. I suggest you study cross-screen navigation.An example would be the dismissViewControllerAnimated , using to return to the previous page.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.