-1

I'm wondering how can I retain the displaying after first change to another view and then change back to current view?

Specifically,as below. My problem is when I click Histoty button I switch to another page, which has the exactly same three button. and when I switch back to current page the table data is lost. And what I want is show the table data without any data reload. Please help me out. Thanks.

enter image description here

zonyang
  • 828
  • 3
  • 10
  • 24

1 Answers1

0

Best way to maintain the data in their respective data models and reload the data when you switch to respective page.

Based on the information provided, you can design your data model to be something like,

class StockInfo {
    var name: String?
    var symbol: String?
    var lastPrice: Double?

    //define additional properties...
}

Note: You can use structure or class type based on your requirement

R P
  • 1,173
  • 2
  • 11
  • 20