Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NSURL * url = [[NSURL alloc] initWithString:urlConnection];
  2.    
  3.     NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30];
  4.     NSData *urlData;
  5.     NSURLResponse *response;
  6.     NSError *error;
  7.    
  8.     urlData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:&error];
  9.    
  10.     NSArray* object = [NSJSONSerialization JSONObjectWithData:urlData options:0 error:&error];
  11.    
  12.     return object;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement