title: How Return to the App Login screen when resuming an app from background?
body: <p>I have an app with multiple views. I would like the app to present to login screen whenever the app is resumed from background. How can I do this?
  I was trying to modify the AppDelegate.swift but I didn't know which code should I add to switch the view.</p>
  
  <p>(Code below doesn't work)</p>
  
  <pre><code>func applicationWillEnterForeground(application: UIApplication) {
      // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
      let vc: AnyObject? = self.storyboard?.instantiateViewControllerWithIdentifier("loginSID")
      self.presentViewController(vc as UIViewController, animated: true, completion: nil)
  }
  </code></pre>