In the process of using UITableView, if you modify the contents of some UITableViewCell in the UITableView in another view, When the call Popviewcontroller returns this UITableView, the modified data will need to be reloaded, and the UITableViewCell data will not be reloaded by default.
In general, we can solve this function by adding [Self.tableview Reloaddata] to the Viewwillappear function in the uitableviewcontroller.m file. This function will call Cellforrowatindexpath this method, thus reloading the UITableViewCell data.
But sometimes we find that the contents of UITableViewCell cannot be refreshed even if the reloaddata is invoked. This is probably because of the error in the Popviewcontroller order you called, which is too early to call Popviewcontroller, because when you call Popviewcontroller this function, The compiler gets the topmost viewcontroller from the Self.navigationcontroller stack (the uitableviewcontroller here) and displays its view, This process will call the Viewwillappear function, such as the initial display interface functions, if you popviewcontroller after the uitableview of some of the properties of the contents of the changes, although can change the value of the property content, But since the UITableView has been shown, the new attribute values are not displayed in the interface, thus creating an illusion of not refreshing the content.
Workaround:
Place the Popviewcontroller method after the modified property value, as shown in the following code (1). In addition, to get Uitableviewcontroller, because at this time the current Viewcontroller has not been pop out, so to take the top of the stack of the next controller, see (2).
Nsarray *allcontrollers = self.navigationController.viewControllers;
Renewtableviewcontroller *parent = [allcontrollers objectatindex:[allcontrollers count]-2]; (2)
parent.test=@ "Test";
[Self.navigationcontroller Popviewcontrolleranimated:yes]; (1)