2010-11-28 3 views
1

나는 사용자가 자신의 이메일 ID와 비밀번호를 입력해야하는 iPhone 앱을 제작하고 있으며, 그런 다음 내 웹 사이트에서 계정에 액세스 할 수 있습니다.백그라운드 작업이 진행되는 동안 일부 처리 방법을 표시하는 방법은 무엇입니까?

인증 세부 정보를 입력하면 다음 페이지가 표시 될 때까지 몇 초 동안 기다려야합니다.

"처리 중"또는 "기다려주십시오"종류의 기호를 사용자에게 표시해야합니다.

어떻게 구현해야합니까?

도와주세요.

답변

0

을 도움이되기를 바랍니다.

David Sinclair의 DSActivityView 클래스는 구현하기가 매우 쉽고 메시지를 표시하고 변경하기가 쉽기 때문에 원하는 경우 탭 모음과 탐색 모음을 포함하여 메시지를 덮어 UI를 비활성화하는 데 사용할 수 있습니다.

http://www.dejal.com/developer/dsactivityview

+0

감사합니다. Mathew. :) –

1

나는 보통 필요에 따라 인스턴스화됩니다 UIView의를 만듭니다.

- (id)initWithLabel:(NSString*)labelName { 
    self = [super init]; 
    if (self) { 
     UIImageView *loadingBackgroundView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 150, 120, 40)]; 
     [loadingBackgroundView setBackgroundColor:[UIColor blackColor]]; 
     [loadingBackgroundView setAlpha:0.9]; 
     [loadingBackgroundView.layer setCornerRadius:8.0]; 
     [loadingBackgroundView.layer setBorderColor:[[UIColor clearColor] CGColor]]; 
     [self addSubview:loadingBackgroundView]; 
     [loadingBackgroundView release]; 

     UILabel *loadingLabel = [[UILabel alloc] initWithFrame:CGRectMake (125, 160, 100, 20)]; 
     [loadingLabel setBackgroundColor:[UIColor clearColor]]; 
     [loadingLabel setTextAlignment:UITextAlignmentCenter]; 
     [loadingLabel setTextColor:[UIColor whiteColor]]; 
     [loadingLabel setText:labelName]; 
     [self addSubview:loadingLabel]; 
     [loadingLabel release]; 

     UIActivityIndicatorView *loadingActivityIndicatorView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(110,160,20,20)]; 
     [loadingActivityIndicatorView setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhiteLarge]; 
     [loadingActivityIndicatorView startAnimating]; 
     [self addSubview:loadingActivityIndicatorView];  
     [loadingActivityIndicatorView release]; 
    } 
    return self; 
} 

이 당신에게 다음과 유사한 줄 것이다 : 여기에 당신이 당신의 자신의 응용 프로그램에서 시도하기 위해 몇 가지 코드의 alt text

0

이 많은 사람들에 의해 처리 된 일이있다, 그래서 당신이 경우 다른 사람의 작업을 활용하고 바퀴의 재발 명을 피하려면 Tapku Library과 같은 것을 사용할 수 있습니다. 오픈 소스와 GitHub에 있습니다.

자세한 내용은 TKProgressAlertViewTKLoadingView 클래스를 확인하십시오.

관련 문제