Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add to your .h file
- @class UIProgressHUD;
- // Add as a class variable:
- UIProgressHUD* ProgressHud;
- // Show the HUD
- - (void) webViewDidStartLoad:(UIWebView*) webView
- {
- if(ShowProgHud == YES)
- {
- ProgressHud = [[UIProgressHUD alloc] initWithWindow: window];
- [ProgressHud setText:@"Loading..."];
- [ProgressHud show:YES];
- }
- }
- // Kill the HUD
- - (void)webViewDidFinishLoad:(UIWebView*) webView
- {
- if(ProgressHud != nil)
- {
- [ProgressHud show:NO];
- [ProgressHud release];
- ProgressHud = nil;
- }
- }
Add Comment
Please, Sign In to add comment