简体   繁体   中英

How to prevent UITableView from reloading after a new controller was pushed?

I'm having a store locator (tableview) and a map view. Basically I want to easily go back and forth these two without having to worry about memory. The tableview downloads a chunk of data and parses them into the tableview.

Is there a way I can not load the table view's data again? Something like a modal view controller, but pushing it on instead of presenting it. I don't wish to store the data into NSUserDefaults and checking if that exists because the data is rather large.

If you don't explicitly tell a table view to reload the data, it won't.

Either you have some code that explicitly reloads your data, or the map view eats a lot of memory, which triggers a cleanup of your table view controller, essentially removing and later rebuilding your table view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM