我有一个应用程序,我想在其中发出几个异步请求,然后一旦我收到响应刷新视图或类似的东西。 如何确定响应与特定请求相关联? 由于这是异步的,我不想维护URL的属性,因为会有几个请求。
[HttpRequestManager makeASynchronousRequest:url withTarget:self withSelector:@selector(receivedImageData:)];
- (void) receivedImageData:(NSMutableData *) data
{
if (data) {
UIImage *image = [[[UIImage alloc] initWithData:data] autorelease];
NSString *path = [self savePngImage:image withLocalURL:**URL should be the one I created earlier**];
if (path) {
[self.delegate receivedImage:image];
}
else
{
}
}
}
我可以传递@selector中的URL(receivedImageData :)?