1

いくつかの非同期リクエストを作成したいアプリがあり、応答を受け取ったらビューなどを更新します。応答が特定の要求に関連付けられていることをどのように判断できますか? これは非同期であるため、複数のリクエストが行われるため、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(receivedImageData:) で URL を渡すことはできますか?

4

0 に答える 0