Quickblox: Custom Module - Custom callback function instead of default 'completedWithResult' -


when using 'custom module', there times when multiple asynchronous requests happen @ same time (handled same delegate) , there need distinguish request triggered 'completedwithresult' callback.

is there way provide custom callback function particular request? if not, best way distinguish between multiple requests inside 'completedwithresult'callback?

you should use context

 [qbusers loginwithuserlogin:@"injoituser1" password:@"injoituser1" delegate:self context:@"thisispoint1"];   [qbusers loginwithuserlogin:@"injoituser1" password:@"injoituser1" delegate:self context:@"thisispoint2"];  - (void)completedwithresult:(result *)result context:(void *)contextinfo{     if([result iskindofclass:qbuuserloginresult.class]){         if(result.success){             if([((nsstring *)contextinfo) isequaltostring:@"thisispoint1"]){                 // smthn             }         } } 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -