먼저 delegate.h 에 선언 
 @interface testAppDelegate: NSObject
UIWindow *window; 
UITextField *textfield; 
UIWebView *webView; 
UIActivityIndicatorView *indicator; 
UIAlertView *alert; 
}
 이후 property, synthesize 를 각각 선언한다. 
-(void)webViewDidStartLoad:(UIWebView *)webView 에 시작코드를 -(void)webViewDidFinishLoad:(UIWebView *)webView 에 해제코드를 삽입한다. 
 






------------------------- - 

-(void)webViewDidFinishLoad:(UIWebView *)webView { 
 statusLabel.text = @"finished";
 [alert dismissWithClickedButtonIndex:0 animated:YES]; 
 - (void)webViewDidStartLoad:(UIWebView *)webView {
 statusLabel.text = @"start";
 alert =[[[UIAlertView alloc] initWithTitle:@"잠시만 기다려주세요.\n로딩중..." 
 message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:nil] autorelease];
 [alert show]; 

indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
 indicator.center = CGPointMake(alert.bounds.size.width/2, alert.bounds.size.height-50); [indicator startAnimating]; 
 
[alert addSubview:indicator];
 [indicator release];
 }

Posted by 후니 유

댓글을 달아주세요:: 스팸은 정중히 사절합니다.


BLOG main image
Cr4cK th3 W0Rld by 후니 유

1,214,106


Today : 143
Yesterday : 177
hit counters

카테고리

전체보기 (802)
Etc (246)
Hacked Brain (280)
My Project (32)
데일리 (22)
운영체제 (31)
프로그래밍 (92)
Securities (27)