2
을 기각하지UIAlertView a 버튼을 클릭하거나 (IBAction를) 내에서 다음 내가 사용
- (IBAction)HistoryBtn:(id)sender {
self startReport];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//============================
so some long processing code
//============================
[self stopReport];
});
}
경우
-(void) startReport
{
alert = [[UIAlertView alloc] initWithTitle:@"Generating PDF" message:@" " delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
UIActivityIndicatorView *progress= [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 50, 30, 30)];
progress.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
[alert addSubview:progress];
[alert setDelegate:self];
[progress startAnimating];
[alert show];
}
-(void) stopReport
{
NSLog(@" Stop Called ");
[self.alert dismissWithClickedButtonIndex:0 animated:NO];
self.alert = nil;
NSLog(@" Stop Called ");
}
문제는 최대 AlertView 팝업 내가 버튼의 작품을 볼 수있다, 다음 StopReport 호출하지만 AlertView가 유지하는 방법은 AlertView 미리 멀리
감사 가고 얻을 수
그레이트 고맙습니다. – BarryF