2009-09-25 4 views

답변

2

당신은 ASIHTTPRequest를 서브 클래스 전이나 요청이 완료된 후 자신의 작업을 수행하는 방법에 대한 자세한 내용은 ASIS3Request 클래스에 보일 것입니다. 자신의 서브 클래스는 다음과 같이 보일 것입니다 : 당신은 ASINetworkQueueMyFancySubclass 인스턴스를 추가하는 경우

@interface MyFancySubclass : ASIHTTPRequest {} 
@end 

@implementation MyFancySubclass 

- (void) main { 
    // Perform pre-request initialisation here 
    [super main]; 
} 

- (void) requestFinished { 
    // Parse [self responseString] or [self responseData] here 
    [super requestFinished]; 
} 

- (void) failWithError:(NSError*)theError { 
    // Handle errors here 
    [super failWithError:theError]; 
} 

@end 

는, 구문 분석은 메인 스레드를 수행됩니다.

관련 문제