PFQueryTableViewController error

一世执手 提交于 2019-12-04 08:05:42

I think I'm doing the same tutorial as you.

I got this to work by deleting Parse.framework from my project, then downloading and importing the Parse.framework from "Lecture 25"

It must just be that the newer parse framework has changed in some way

one workaround is to tweak the custom PFQueryTableViewController.h file provided in ParseUI.

Simply include the following in your HomeViewController.m to override the Parse provided similar method(If it doesn't exist , add it to the PFQueryTableViewController.h under ParseUI.Framework>Headers Add this to the h.: - (NSIndexPath *)_indexPathForPaginationCell;

Call the code below in your .m file:

- (NSIndexPath *)_indexPathForPaginationCell {

return [NSIndexPath indexPathForRow:0inSection:[self.objectscount]];

}

Credit goes to a gentlemen by the name of Axel Wittmann .

Your error is likely linked to:

return 1;

In your numberOfRowsInSection method.

It's likely that the 'loadMorePages' function is trying to delete the row which has the 'Load More Pages' button. This would usually be in row 3 for you (first three rows 0-2 are data). Because you have changed the way rows and sections are shown this doesn't work.

The docs for loadMorePages specify that it: Loads the next page of objects, appends to table, and refreshes.

I know this old but I noticed that the answer given above didnt seem to work the way it was typed.

This did work however:

- (NSIndexPath *)_indexPathForPaginationCell {
    return [NSIndexPath indexPathForRow:0 inSection:self.objects.count];    
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!