MBProgressHUD during loading webView
===

I have a problem to show MBProgressHUD during the loading of my webView.

I have a simple webview in my app, and i would like showing MBProgressHUD during the loading of my web view, and then hide the MBProgressHUD. I have write this code, but it doesn't work. In fact, i don't know what i must write in "myTask" functu

Can you help me please?

Thanks you :)

AccueilViewController.h :

    #import <UIKit/UIKit.h>
    #import "MBProgressHUD.h"
    
    @interface AccueilViewController : UIViewController <MBProgressHUDDelegate> {
    	
        MBProgressHUD *HUD;
        long long expectedLength;
    	long long currentLength;
    
    }
    
    @property (weak, nonatomic) IBOutlet UIWebView *webView;
    
    - (void)myTask;
    
    @end

AccueilViewController.m :
 
    #import "AccueilViewController.h"
    
    @interface AccueilViewController ()
    
    @end
    
    @implementation AccueilViewController
    
    @synthesize webView;
    
    
    - (void)viewDidLoad
    {
        [super viewDidLoad];
        NSString *fullURL = @"http://myURL.com";
        NSURL *url = [NSURL URLWithString:fullURL]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
        [webView loadRequest:requestObj];
    
    	// Do any additional setup after loading the view, typically from a nib.
    }
    
    - (void)viewDidUnload
    {
        [self setWebView:nil];
        [super viewDidUnload];
        // Release any retained subviews of the main view.
    }
    
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
            return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
        } else {
            return YES;
        }
    }
    
    - (void) webViewDidStartLoad:(UIWebView *) webView
    {
        HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
    	[self.navigationController.view addSubview:HUD];
    	
    	HUD.delegate = self;
    	HUD.labelText = @"Chargement en cours ...";
    	
    	[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];
    
    }
    
    - (void) webViewDidFinishLoad:(UIWebView *) webView
    {
        [HUD hide:YES];
    }
    
    - (void)myTask {
    	    
    }
    
    
    
    @end


