Guest User

Untitled

a guest
May 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. // Add to your .h file
  2. @class UIProgressHUD;
  3.  
  4. // Add as a class variable:
  5. UIProgressHUD* ProgressHud;
  6.  
  7. // Show the HUD
  8. - (void) webViewDidStartLoad:(UIWebView*) webView
  9. {
  10. if(ShowProgHud == YES)
  11. {
  12. ProgressHud = [[UIProgressHUD alloc] initWithWindow: window];
  13. [ProgressHud setText:@"Loading..."];
  14. [ProgressHud show:YES];
  15. }
  16. }
  17.  
  18. // Kill the HUD
  19. - (void)webViewDidFinishLoad:(UIWebView*) webView
  20. {
  21. if(ProgressHud != nil)
  22. {
  23. [ProgressHud show:NO];
  24. [ProgressHud release];
  25. ProgressHud = nil;
  26. }
  27. }
Add Comment
Please, Sign In to add comment