Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. dispatch_queue_t downloadQueue = dispatch_queue_create("downloader", NULL);
  2.  
  3. dispatch_async(downloadQueue, ^{
  4. NSData *result = self.envoyerLaDemande;
  5. dispatch_async(dispatch_get_main_queue(), ^{
  6.  
  7. id strResult=nil;
  8.  
  9. strResult = [NSJSONSerialization JSONObjectWithData:result options:0 error:nil];
  10.  
  11. NSLog(@"strResult: %@", strResult);
  12.  
  13. NSString* boolOk=[strResult objectForKey:@"result"];
  14. NSLog(@"BoolOk: %@", boolOk);
  15.  
  16. $data = array();
  17.  
  18. if(condition == 1)
  19. {
  20. $data["result"] = "ok";
  21. }
  22. else
  23. {
  24. $data["result"] = "error";
  25. }
  26. $data["result"] = "coucou";
  27. }
  28. echo json_encode($data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement