How to make sure that all the data present is vanished when that window is closed?
I have a window with few source list items.Here if you select each item fr开发者_Go百科om the source list then its view will be loaded in that window.That view will be having its ViewController and modelController. I open it and some results will be populated into it.and the same is done for other sourcelist items too. My question is how to make sure the data present in the window is cleared when the window is closed and reopened?
What about using windowDidLoad
for that? Each time your window is opened, you refresh your data. In other words, the first time the windows is loaded, you will instantiate your model (the data) and then populate it; the next time, you could either delete the previous model and create a new one, or simply update it with the new data you have.
精彩评论