뷰에서 세 가지 웹 서비스를 호출해야합니다. 나는 ASIHttprequest
전화를 사용하고 있습니다. 나는 각 웹 서비스를 하나씩 호출 할 것이다. 충돌이 발생합니다.여러 배경 웹 서비스 호출로 인해 충돌이 발생했습니다.
-[INetServices respondsToSelector:]: message sent to deallocated instance 0x12629a10
이 잘못된 요청 오류를 어떻게 극복 할 수 있습니까?
HUDadmin = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:HUDadmin];
HUDadmin.delegate = self;
HUDadmin.labelText [email protected]"Loading";
//[HUD hide:YES afterDelay:20];
[HUDadmin showWhileExecuting:@selector(adminCheck) onTarget:self withObject:nil animated:YES];
은 다음 adminCheck
가되는 경우로 :
-(void)adminCheck
{
INetServices *inetadmin=[[INetServices alloc]init];
NSString *response = [inetadmin doHTTPPostadmincheck:getUserId comm_id:str_commId];
if (!response) {
NSLog(@"response nil ");
return;
}
NSMutableArray *jsonarrayResponse=[response JSONValue];
NSLog(@"Admin:%@",jsonarrayResponse);
str_adminStatus = [jsonarrayResponse valueForKey:@"admin_status"];
if ([[jsonarrayResponse valueForKey:@"status"] isEqualToString:@"success"]==TRUE)
{
if ([[jsonarrayResponse valueForKey:@"message"]isEqualToString:@"Admin user!."]==TRUE)
{
int_adminStatus=1;
}
else
{
int_adminStatus=0;
}
}
[self performSelectorOnMainThread:@selector(hideProgress) withObject:nil waitUntilDone:NO];
[self performSelectorOnMainThread:@selector(CommunityDetailwebservice)
withObject:nil waitUntilDone:NO];
}
[예외 중단 점] (https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html)을 추가하면 해당 줄이 문제를 일으키는 지 확인할 수 있습니다. 또는 스택 추적을 우리와 공유하십시오. 내가 의심하는 유일한 것은'showWhileExecuting'에있는 동안'hideProgress'를 호출한다는 것입니다. 그 방법은 무엇을 하는가? HUD를 사용하는보기 컨트롤러를 제거하려고 할 가능성이 있습니까? – Rob
예 숨기기 Progess 메서드 숨기기 Hud.then 호출하는 CommunityDetailwebservice .. 같은 프로세스가 발생하고 커뮤니티 세부 정보 webservice 다시 webservice가 호출됩니다 .... – user3388273