PFQueryTableViewController limit

32 Views Asked by At

I'm trying to set a limit on a PFQuery tableview controller but it's not working. I'm trying to make it so that it loads 1 cell, then another after pagination, and then another.

Here is my code.

override func queryForTable() -> PFQuery<PFObject> {
    var query : PFQuery<PFObject>!
    query = PFQuery(className: "Products")
    query.limit = 1

    return query
}
1

There are 1 best solutions below

8
EmilioPelaez On

Instead of adding a limit to your query, set the objectsPerPage property of your PFQueryTableViewController to 1.