One view that is a subview of one view controller. And this view will show some data that are stored on one plist file. However, this plist file will be changed on next view controller. When the screen back from next view controller to previous view controller that has the customary view as subview, the data will not be refreshed. In this situation, how can I fix it? And there are several solutions that are provided on the network.
First solution:
if(self isViewLoaded)
{
self.view = nil;
[self viewDidLoad];
}
This solution has one problem that the view of controller is black and will not show any others. But if I delete following code, the data on the view could be refreshed.
self.view = nil;
However, there is one problem that I could see some words under this layer. I guess that it will create new layer above the older layer. Because some lighter words that are not the data on current version plist file instead of previous version plist file are on this subview
Second solution:
[self.view setNeedsDisplay];
this code has not any function.