title: How to refresh UIWebView when app comes to foreground?
body: <p>I would like to refresh a UIWebView whenever my app comes to the foreground.  All I really have in my ViewController.m is a method that checks for internet access (hasInternet) and viewDidLoad.  </p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  @synthesize webview;
  
  -(BOOL)hasInternet{
      Reachability *reach = [Reachability reachabilityWithHostName:@"www.google.com"];
      NetworkStatus internetStats = [reach currentReachabilityStatus];
  
      if (internetStats == NotReachable) {
          UIAlertView *alertOne = [[UIAlertView alloc] initWithTitle:@"You're not connected to the internet." message:@"Please connect to the internet and restart the app." delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
          [alertOne show];
      }
  
      return YES;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      [self hasInternet];
      [webView loadRequest: [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://warm-chamber-7399.herokuapp.com/"]] ];
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  @end
  </code></pre>
  
  <p>Any advice on how to enable this functionality?  Does it go in AppDelegate or do I create another method within ViewController.m?</p>