title: Network Error Alert in Xcode Needed Urgently
body: <p>I recently started an Xcode project, and its mostly web-based, in the sense it mostly works with UIWebView. I am a total noob at this. I would like to make an "No Internet Connection Alert". Basically An Alert that comes up if you have no internet connection. I have tried using the Reachability but since I'm such a noob, I didn't manage to figure ANYTHING out.. Heres my view controller:
  This is my .h file: P.S: My WebView is called 'webone'.</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface FirstViewController : UIViewController
  
  -(IBAction)refreshClicks:(id)sender;
  
  @property (weak, nonatomic) IBOutlet UIWebView *webone;
  @end
  </code></pre>
  
  <p>And This is My .m file:</p>
  
  <pre><code>#import "FirstViewController.h"
  @interface FirstViewController ()
  
  @end
  
  @implementation FirstViewController
  @synthesize webone;
  
  
  -(void)viewDidLoad {
      NSURL *url = [NSURL URLWithString:@"http://www.lostcraft.net/mobile"]; 
      NSURLRequest *req = [NSURLRequest requestWithURL:url]; 
      [webone loadRequest:req];    
      [super viewDidLoad];
  }
  
  -(void)awakeFromNib{  //IGNORE
      [self refreshClicks:self]; //IGNORE
  }
  
  -(IBAction)refreshClicks:(id)sender{//IGNORE
      [webone loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.lostcraft.net/mobile"]]];//IGNORE
  }
  
  - (void)viewDidUnload
  {
      [self setWebone: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;
      }
  }
  </code></pre>