title: Navigate to a UIViewController from a UIAlertView in Swift 2.3
body: <p>I am new to Swift and iOS development. I have been trying to create an app-wide check for internet connectivity, that allows the user to retry (reload the current view). The <code>checkInternetConnection()</code> function below is called during <code>viewWillAppear()</code> in my <code>BaseUIViewController</code> class.</p>
  
  <p>The <code>Reachability.isConnectedToNetwork()</code> connectivity-check works fine. But so far, I have not been able to figure out a way to reload the current view after the user presses the 'Retry' button in the alert. in fact, I have not been able to figure out a way to reload the current view in any scenario.</p>
  
  <p>One thing I know I am doing wrong in the following attempt (since there is a compile error telling me so), is that I am passing a <code>UIViewController</code> object as a parameter instead of a <code>string</code> on this line: <code>self.performSegueWithIdentifier(activeViewController, sender:self)</code>, but I suspect that this is not my only mistake.</p>
  
  <pre><code>func checkInternetConnection() {
      if (Reachability.isConnectedToNetwork()) {
      print("Internet connection OK")
  } else {
      print("Internet connection FAILED")
      let alert = UIAlertController(title: NSLocalizedString("Error!", comment: "Connect: error"), message: NSLocalizedString("Could not connect", comment: "Connect: error message"), preferredStyle: UIAlertControllerStyle.Alert)
      alert.addAction(UIAlertAction(title: NSLocalizedString("Retry", comment: "Connect: retry"), style: .Default, handler: { action in
          print("Connection: Retrying")
          let navigationController = UIApplication.sharedApplication().windows[0].rootViewController as! UINavigationController
          let activeViewController: UIViewController = navigationController.visibleViewController!
          self.performSegueWithIdentifier(activeViewController, sender:self)
      }))
      self.presentViewController(alert, animated: true, completion: nil)
      }
  }
  </code></pre>