You need to sign in to do that
Don't have an account?
Jyoti Singh 9
Pagination for SmartStore in iOS SDK
Can anyone tell me how can I paginate the records in SmartStore for an app built using Salesforce iOS SDK. I am currently doing
Please help
- (NSArray*)query:(NSString*)queryString { SFQuerySpec *querySpec = [SFQuerySpec newSmartQuerySpec:queryString]; int count = [self.store countWithQuerySpec:querySpec error:nil]; querySpec = [SFQuerySpec newSmartQuerySpec:queryString ]; return [self.store queryWithQuerySpec:querySpec error:nil]; }
Please help
The key is to
* use withPageSize to specify the pagesize
* Do a count of the records
* Set the withPageSize while querying the store
* Set starting page Index to 0
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.
Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker