Hi Guys,
Im building data collection paging into my app right now. The sync method works great, following the instructions found on: https://backendless.com/feature-17-data-paging-or-how-to-efficiently-load-large-data-sets-in-a-mobile-app/
However, what I need is to have the happen in aSync. Problem is that in the example the method ‘self.getPageAsync(restaurants, offset:offset, startTime:startTime)’ is missing from the example:
func advancedPagingAsync() {
var startTime = NSDate()
var offset = 0
var query = BackendlessDataQuery()
query.queryOptions.pageSize = PAGESIZE // set page size
backendless.persistenceService.of(Restaurant.ofClass()).find(
query,
response: { (var restaurants : BackendlessCollection!) -> () in
println("Total restaurants in the Backendless starage - \(restaurants.totalObjects)")
self.getPageAsync(restaurants, offset:offset, startTime:startTime)
},
error: { (var fault : Fault!) -> () in
println("Server reported an error: \(fault)")
}
)
}
}
Can you let me know how to implement this?