我有 4 个表视图,它们都有自己的 NSFetchedResultsController
在某一时刻,我正在尝试全部重置/重新加载它们......就像这样
fetchedResultsControllerArray = [NSArray arrayWithObjects:__fetchedResultsController1, __fetchedResultsController2, __fetchedResultsController3, __fetchedResultsController4, nil];
for (NSFetchedResultsController __strong *frc in fetchedResultsControllerArray){
frc.delegate = nil;
frc = nil;
[frc performFetch:&error];
}
[tv1 reloadData];
[tv2 reloadData];
[tv3 reloadData];
[tv4 reloadData];
这不起作用..表格未显示最新数据。
但是,如果我取出枚举并仅使用其中一个进行枚举,它会起作用吗?
fetchedResultsControllerArray = [NSArray arrayWithObjects:__fetchedResultsController1, __fetchedResultsController2, __fetchedResultsController3, __fetchedResultsController4, nil];
__fetchedResultsController1.delegate = nil;
__fetchedResultsController1 = nil;
[__fetchedResultsController1 performFetch:&error];
[tv1 reloadData];
[tv2 reloadData];
[tv3 reloadData];
[tv4 reloadData];
谁能解释我在枚举过程中可能做错了什么?
谢谢!