I have the following code but unsure why its not running:
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithURL:
[NSURL URLWithString:myURLString] completionHandler:^
(NSData *data, NSURLResponse *response, NSError *error)
{NSDictionary *json =
[NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
[self performSegueWithIdentifier:@"login" sender:self];}];
[dataTask resume];
The preformSegueWithIdentifier works outside but not inside the brackets. But I have done something similar using NSUrlConnection and that works fine. I'm new to NSURLSession any ideas why the performSegueWithIdentifier doesn't run within the call.
Any ideas?