Search code examples
iosobjective-cquickblox

How can I receive the number of my users list with paginator form QuickBlox?


I use QuickBlox in my app and when I take the list of users I use this method :

- (void)paginator:(id)paginator didReceiveResults:(NSArray *)results {
    [self.activityIndicator stopAnimating];          
    // reload table with users    
    [self.users addObjectsFromArray:results]; 
} 

but I receive just 100 of users, and I have to take 162 for now. What can I do?


Solution

  • Please use

    + (QBRequest *)usersForPage:(QBGeneralResponsePage *)page successBlock:(void (^)(QBResponse *, QBGeneralResponsePage *, NSArray *))successBlock

    with QBGeneralResponsePage you can get users per page

    If you have an old SDK, please try new SDK with CocoaPods http://quickblox.com/developers/IOS-how-to-connect-Quickblox-framework#CocoaPods