我需要尽快刷新视图的内容popViewController [英] I need to refresh the content of a view as soon as I popViewController
问题描述
ViewA
从Coredata加载一些数据,然后推送到下一个 viewB
.在 viewB
中,有一些功能可以更改viewA的内容(意味着viewB可以更改核心数据的内容).但是,当我将视图弹出回到 viewA
时,我的内容与以前相同.我怎样才能解决这个问题?
ViewA
load some data from Coredata, then push to the next viewB
. In viewB
, there are some function, that will change the content of viewA (meaning viewB change the content of core data). However, when I pop the view back to viewA
, my content stay the same as before. How can I fix this?
推荐答案
在viewA的-(void)viewWillAppear:(BOOL)animated
委托方法中,您可以刷新所需的控件...即,如果您想重新加载表在viewWillAppear方法中写
in viewA's -(void)viewWillAppear:(BOOL)animated
delegate method you can refresh the control you need... i.e. if you want to reload table that
in viewWillAppear method
write
[Table reloadData];
这篇关于我需要尽快刷新视图的内容popViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!