当我尝试构建我的 iPhone 应用程序时收到此错误:解析问题 - 预期标识符
我的代码:
- (void)fetchedData:(NSData *)responseData
{
NSError *error;
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData
options:kNilOptions error:&error];
self.titleLabel.text = [json objectForKey:@"name"];
self.aboutText.text = [json objectForKey:@"about"];
NSURL *url = [[NSURL URLWithString: [json objectForKey:@"picture"]];
dispatch_queue_t queue = dispatch_get_global_queue
(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
NSData *data = [NSData dataWithContentsOfURL: url];
self.profileImage.image = [UIImage imageWithData: data];
});
}
我得到了在线错误:
NSURL *url = [[NSURL URLWithString: [json objectForKey:@"picture"]];
有人可以解释什么是错的吗?