Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSURL * url = [[NSURL alloc] initWithString:urlConnection];
- NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30];
- NSData *urlData;
- NSURLResponse *response;
- NSError *error;
- urlData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:&error];
- NSArray* object = [NSJSONSerialization JSONObjectWithData:urlData options:0 error:&error];
- return object;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement