2011-01-29 1 views
0

다운로드하는 동안 진행률 표시 줄에 작업 표시 줄이 표시되도록 노력하고 있습니다. 다운로드 도중 시트가 표시되지 않고 다운로드가 완료되면 시트가 표시되고 UI가 작동하지 않는 것처럼 화면이 어두워집니다. 어떤 블로킹 활동이 계속 진행 중이며 다른 스레드 나 다른 스레드에 있어야한다고 가정하지만 아직 iOS 스레딩 모델에 익숙하지 않습니다. 나는 또한 시트를 제거했기 때문에 디스플레이가 어둡다 고 생각합니다. 어떻게 그것을 기각 할 수 있습니까? 시트를 위로 설정하는 코드는 다음과 같습니다작업 시트가 표시되지 않습니다.

self.pActionSheet=[[[UIActionSheet alloc] initWithTitle:@"Downloading Alerts. Please Wait.\n\n\n" delegate:nil cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil] autorelease]; 
     pBarView=[[UIProgressView alloc] initWithFrame:CGRectMake(0.0f,40.0f, 220.0f, 90.0f)]; 
     [pBarView setProgressViewStyle:UIProgressViewStyleDefault]; 
     [pActionSheet addSubview:pBarView]; 
     [pBarView release]; 
     [pBarView setProgress:0.0f]; 
     [pActionSheet showInView:self.view]; 
     pBarView.center=CGPointMake(pActionSheet.center.x,pActionSheet.center.y); 
     pAmt=1.0/(float)totalDownload; 

성명은 그것이 해제 :

답변

0

[pActionSheet removeFromSuperView[;performSelectorInBackground: (reference)와 다른 스레드에서 다운로드를 수행합니다. dismissWithClickedButtonIndex : - 메서드를 사용하여 작업 시트를 닫습니다 (reference).

+0

감사합니다 도움이되기를 바랍니다하려고합니다. 작업을 닫지 만 두 참조 모두 작업 시트 문서를 가리 킵니다. 다른 참고 자료가 있으면 편리할까요? 큰일이 아닐지라도 내가 찾을 수 있는지 알게 될 것이다. – mlewis54

+0

발견하고 잘 작동합니다. 도와 주셔서 감사합니다. – mlewis54

+0

죄송합니다, 지금 링크를 수정했습니다. –

0

이 내가이 의지는 당신에게

UIActionSheet *popup = [[UIActionSheet alloc]initWithTitle:@"Select Sharing Option" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Facebook",@"Twitter",@"E-Mail",nil]; 
popup.tag = 1; 
[popup showInView:[UIApplication sharedApplication].keyWindow];