0

我試圖改變我的NSFetchedResultsController的fetchRequest的謂詞,但是當我嘗試從aqgridview重新加載數據時,沒有顯示單元格。AQGridView問題當我修改fetchRequest的謂詞

我的代碼:

[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]; 

解決:

OK,解決。我不得不改變 「setContentSize:(CGSize)新尺寸」 的方法在AQGridView.m:

來源:

if (newSize.height < footerHeight + minimumHeight) 

要:

if (newSize.height < minimumHeight) 

由於minimumHeight已經包含footerHeight,之前,footerHeight被添加兩次。

+0

我認爲問題可能在reloadData方法中,完全在self.contentSize = [_gridData sizeForEntireGrid]; – 2011-05-18 14:01:50

回答

0

我解決了:在問題中的答案。