我试图在我的 NSFetchedResultsController 上更改 fetchRequest 的谓词,但是当我尝试从 aqgridview 重新加载数据时,没有显示任何单元格。
我的代码:
[NSFetchedResultsController deleteCacheWithName: nil];
NSPredicate *predicate = [NSPredicate predicateWithFormat: @"colection = %@", newcolection ];
[fetchedResultsController.fetchRequest setPredicate:predicate];
NSError *error = nil;
if (![[self fetchedResultsController] performFetch:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
[comicGridView reloadData];
解决了:
好的,解决了。我不得不更改 AQGridView.m 中的“setContentSize: (CGSize) newSize”方法:
从:
if (newSize.height < footerHeight + minimumHeight)
到:
if (newSize.height < minimumHeight)
由于 minimumHeight 已经包含 footerHeight,所以之前,footerHeight 被添加了两次。