I am implementing PFQueryTableViewController from Parse with sections and pagination. Because I am using sections, I need to set the 'load more' cell on my own. However, It seems that I can't access the method cellForNextPageAtIndexPath - I get an error: ''UITablView' does not have a member name 'cellForNextPageAtIndexPath' ' .
I've looked around and the only resource on the subject seems to be this unanswered question: cellForNextPageAtIndexPath in swift
Here's my code:
override func tableView(tableView: UITableView, cellForNextPageAtIndexPath indexPath: NSIndexPath) -> PFTableViewCell? {
return PFTableViewCell()
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: PFObject!) -> PFTableViewCell? {
let objectId = objectIdForSection((indexPath.section))
let rowIndecesInSection = sections[objectId]!
let cellType = rowIndecesInSection[(indexPath.row)].cellType
var cell : PFTableViewCell
if (indexPath.section == self.objects?.count) {
cell = tableView.cellForNextPageAtIndexPath(indexPath) //'UITablView' does not have a member name 'cellForNextPageAtIndexPath'
}
switch cellType {
case "ImageCell" :
cell = setupImageCell(objectId, indexPath: indexPath, identifier: cellType)
case "PostTextCell" :
//cell = setupImageCell(objectId, indexPath: indexPath, identifier: "ImageCell")
cell = setupTextCell(objectId, indexPath: indexPath, identifier: cellType)
case "CommentsCell" :
cell = setupCommentsCell(objectId, indexPath: indexPath, identifier: cellType)
case "UpvoteCell" :
cell = setupUpvoteCell(objectId, indexPath: indexPath, identifier: cellType)
case "DividerCell" :
cell = setupDividerCell(indexPath, identifier: cellType)
default : print("unrecognised cell type")
cell = PFTableViewCell()
}
cell.selectionStyle = UITableViewCellSelectionStyle.None
return cell
}