title: How implement a UIActivityIndicatorView when the UIWebView is Loading? (iPhone ObjC)
body: <p>I want to know how to implement an activityIndicator in a WebView based app, I wrote the following code but the indicator does not appear.</p>
  
  <p>The webview load file locally, so it load very fast, but when it load an external page it load slow and I need the indicator...</p>
  
  <p><strong>FirstViewController.h</strong></p>
  
  <pre><code> #import &lt;UIKit/UIKit.h&gt;
  
   @interface FirstViewController : 
   UIViewController &lt;UIWebViewDelegate&gt;{
      IBOutlet UIWebView *webview1;   
      NSURL *urlLocation;     
      IBOutlet UIActivityIndicatorView *m_activity; 
   }
  
   @property (nonatomic, retain) UIActivityIndicatorView *m_activity;
  
   - (IBAction)searchbutton:(id)sender;
   - (IBAction)home:(id)sender;
  
   @end
  </code></pre>
  
  <p><strong>FirstViewController.m</strong></p>
  
  <pre><code> #import "FirstViewController.h"
  
   @implementation FirstViewController
  
  
   @synthesize m_activity;
  
   // viewWillAppear loads every time younopen up this View
  
   - (void)viewWillAppear:(BOOL)animated {
     NSString *filePath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];          
     urlLocation = [NSURL fileURLWithPath:filePath];  
     [webview1 loadRequest:[NSURLRequest requestWithURL:urlLocation]]; 
   }
  
  
  
  
   - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {     
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {      
       //Initialization code      
       m_activity = nil;  
     }    
     return self; 
   }
  
   - (void)webViewDidFinishLoad:(UIWebView *)webView {    
     m_activity.hidden= TRUE;     
     [m_activity stopAnimating];  
     NSLog(@"Web View started loading...");
   }
  
   - (void)webViewDidStartLoad:(UIWebView *)webView {     
     m_activity.hidden= FALSE;    
     [m_activity startAnimating];     
     NSLog(@"Web View Did finish loading");
   }
  </code></pre>