title: Xcode / iOS6 / UIWebView URL / HTML links do not work
body: <p>After looking through numerous Stack Overflow posts, I was unable to find a solution to my problem. If I am asking a question that has already been answered elsewhere, kindly give me a nod in the right direction. </p>
  
  <p>And, please, don't be too harsh on me if I might be using the wrong terminology, as I am still kind of new to mobile development.</p>
  
  <p><strong>Problem:</strong> All I am trying to do is click a link in a local web page that gets pulled up in a UIWebView. Currently, nothing happens when I click a link, aside from a brief flash of the current page.</p>
  
  <p><strong>This is where I'm at:</strong></p>
  
  <p>1) When the application loads, I show a web view which displays a "local" web page (that's part of my xcode project). So far, so good.</p>
  
  <p>2) When the end user clicks an item (geographical regions in my case, represented by a flag), additional content becomes visible, including a couple of links, leading to "external" web apges, such as wikipedia and a map web site.</p>
  
  <p>3) Most of my little web app is in the web page I show when the application has loaded. I use JavaScript, HTML and CSS to provide most of the functionality (since I already have a web site that does exactly what it is supposed to do).</p>
  
  <p>4) However, being able to link to other web sites from my start page is crucial.</p>
  
  <p>(If you think this is poor design, I'll accept that. Suggestions for better approaches are always welcome; HOWEVER, I do need to solve my current problem before I can restructure my code. Please bear with me.)</p>
  
  <p>Here's the code that brings up the initial web page:</p>
  
  <pre><code>// View Controller.h
  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  #import &lt;UIKit/UIKit.h&gt;
  @interface ViewController : UIViewController
  @property (strong, nonatomic) IBOutlet UIWebView *spfWebView;
  @end
  
  // ViewController.m
  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  #import "ViewController.h"
  
  @interface ViewController ()
  @end
  
  @implementation ViewController
  @synthesize spfWebView;
  
  - (void)viewDidLoad{
  
      [super viewDidLoad];
  
      //Web Site within XCode Project:
      NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"www/index" ofType:@"html"] isDirectory:NO];
  
      //NSURL *url = [NSURL URLWithString:urlString];
      NSURLRequest *request = [NSURLRequest requestWithURL:url];
      NSOperationQueue *queue = [[NSOperationQueue alloc] init];
      [NSURLConnection sendAsynchronousRequest:request queue:queue
  completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
                       if ( [data length] &gt; 0 &amp;&amp; error == nil ){
                           [spfWebView loadRequest:request];
                       }else if (error != nil){
                           NSLog(@"Error: %@", error);
                       }
      }];
  
  }
  
  - (void)didReceiveMemoryWarning{
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
      return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
  }
  
  @end
  </code></pre>
  
  <p>So in my web page, I am using standard, normal a href links to point to wikipedia, for example, like so (I had to use spaces in the href part to avoid SO from interpreting it as a link, since I only wanted to show you the code for the link):</p>
  
  <pre><code>&lt;a href ="http://en.wikipedia.org/wiki/Schaffhausen"&gt;Wikipedia&lt;/a&gt;
  </code></pre>
  
  <p>And, as I've mentioned, the page just sits there when I click or tap the link. The page seems to reload briefly and flashes on the screen, but that's all I see.</p>
  
  <p>Any ideas anyone?</p>