开发者

AQGridView problem when i modify the fetchRequest's predicate

I'm trying to change the fetchRequest's predicate on my NSFetchedResultsController, but when i try to reload the data from the aqgridview, none cell is displayed.

My code:

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

SOLVED:

OK, solved. I had to change the "setContentSize: (CGSize) newSize" method in AQGridView.m:

From:

if (newSize.height < footerHeight + minimumHeight)

To:

if (newSize.height < minimumHeight)

As minimumHeight already co开发者_运维百科ntains footerHeight, before, footerHeight is added in twice.


I've solved: answer in the question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜