ASIHTTPRequest, EXC_BAD_ACCESS when request did finished

后端 未结 3 1215
后悔当初
后悔当初 2021-01-14 12:58

I\'m trying to do an asynchronous request with ASIHTTPRequest, but have some problem getting notified when the request is done.

-(void)doDownload{
    NSURL          


        
3条回答
  •  离开以前
    2021-01-14 13:37

    Following line of your code seems to be wrong.

    [request setDidFinishSelector:@selector(requestFinished)];
    

    requestFinished method has an argument (ASIHTTPRequest *).
    Therefore you should add ":", when you set a selector like as follows.

    [request setDidFinishSelector:@selector(requestFinished:)];
    

提交回复
热议问题