开发者

AQGridView problem when i modify the fetchRequest's predicate

开发者 https://www.devze.com 2023-03-06 22:45 出处:网络
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.

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

精彩评论

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

关注公众号