모달보기를 표시하는 응용 프로그램이 있습니다. 마지막 모달보기에는 양식이 있습니다. 완료 버튼을 클릭하면 사용자로부터 입력 된 값을 전달하는 웹 서비스가 호출됩니다. 응답을 받으면 모달 뷰가 닫힙니다. 나는 웹 서비스 호출이 많은 시간을 들여서 대기하도록 사용자에게 요청하는 경고 또는 조치 시트를 표시하고 싶습니다. 문제는보기가 닫힌 후에 만 경고 또는 조치 시트가 표시된다는 것입니다. 왜 이런 일이 일어나는 걸까요? done 함수의 코드는 다음과 같습니다.모달보기에서 경고 표시
-(void)reg:(id)sender {
if([password length] == 0) {
//show alert
}
//other validation
//This is were I write the alert
UIActivityIndicator *activity = [[UIActivityIndicator alloc] initWithActivityIndicatorStyle:
UIActivityIndicatorStyleWhite];
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Processing" delegate:self otherButtonTitles:nil];
[alert addSubview:activity];
[activity startAnimating];
[alert show];
WebServiceController *web = [[WebServiceController alloc]init];
//webservice called
//getting the response
//dismissing alert here
[self dismissModalViewControllerAnimated:YES];
}
경고 코드를 게시 할 수 있습니까? – visakh7