title: iOS Link to external page
body: <p>Having read <a href="https://stackoverflow.com/questions/7116393/how-to-create-a-button-that-links-to-safari">this thread</a>, I'm trying to insert a link to an external web page calling an action upon <code>touch inside</code> on a button (button created in storyboard with xCode 4.6).</p>
  
  <p>This is the action:</p>
  
  <pre><code>-(IBAction)outLink:(id)sender {
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://www.mysite.com/index.php"]];
  }
  </code></pre>
  
  <p>and this the header file (<code>.h</code>):</p>
  
  <pre><code>@interface MenuViewController : UIViewController &lt;UITableViewDataSource, UITabBarControllerDelegate&gt;{
      IBOutlet UIButton *linkToSite;
  }
  
  -(IBAction)outLink;
  </code></pre>
  
  <p>I have linked the button to the element in the storyboard, and I've linked the action to the <code>Touch Up Inside</code> event, but I get this error when I click in the simulator on the button:</p>
  
  <pre><code>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MenuViewController outLink]: unrecognized selector sent to instance 0x717d340'
  </code></pre>