Query limit to 5 and add load more to load another 5 in PFQueryTableViewController

122 Views Asked by At

How do I query limit 5 and once user scroll down , it will load another 5

Here's the code

override func queryForTable() -> PFQuery {
        var query = PFQuery(className: "product")
        query.orderByDescending("createdAt")


        return query
    }

Do I need to set a limit?

1

There are 1 best solutions below

3
On

Definitely, there is that PFQuery limitation method

 query.limit = 5