title: Navigation and tab bar missing when presenting view controller
body: <p>I am implementing home screen shortcuts using 3D Touch, and it's working well, however the way I currently have it means that when the shortcut takes the user to a specific view controller, the tab bar and navigation bar is missing.</p>
  
  <p>This is my code:</p>
  
  <pre><code>func handleShortCutItem(shortcutItem: UIApplicationShortcutItem) -&gt; Bool {
      var handled = false
  
      if let shortcutType = ShortcutType.init(rawValue: shortcutItem.type) {
          let rootViewController = window!.rootViewController
  
          switch shortcutType {
          case .Favourites:
              let storyboard = UIStoryboard(name: "Main", bundle: nil)
              let rootController = storyboard.instantiateViewControllerWithIdentifier("favourites") as! FavouritesTableViewController
              rootController.parkPassed = DataManager.sharedInstance.getParkByName(NSUserDefaults.standardUserDefaults().stringForKey("currentPark")!)
              self.window?.rootViewController = rootController
              self.window?.makeKeyAndVisible()
  
              handled = true
          }
      return handled
  }
  </code></pre>
  
  <p>Can anyone suggest what I need to change in the code?</p>
  
  <p>This is the starboard layout (FavouritesTableViewController is indicated):</p>
  
  <p><a href="https://i.stack.imgur.com/SJifh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SJifh.png" alt="enter image description here"></a></p>
  
  <p>EDIT: </p>
  
  <p>Here is my updated code:</p>
  
  <pre><code>@available(iOS 9.0, *)
  func handleShortCutItem(shortcutItem: UIApplicationShortcutItem) -&gt; Bool {
      var handled = false
  
      if let shortcutType = ShortcutType.init(rawValue: shortcutItem.type) {
          switch shortcutType {
          case .Favourites:
              print("favourites")
              let storyboard = UIStoryboard(name: "Main", bundle: nil)
              let rootController = storyboard.instantiateViewControllerWithIdentifier("favourites") as! FavouritesViewController
              rootController.parkPassed = DataManager.sharedInstance.getParkByName(NSUserDefaults.standardUserDefaults().stringForKey("currentPark")!)
  
              let root = UIApplication.sharedApplication().delegate as! AppDelegate
              if let navCont = root.window?.rootViewController?.navigationController {
                  navCont.presentViewController(rootController, animated: true, completion: nil)
              } else {
                  root.window?.rootViewController?.presentViewController(rootController, animated: true, completion: nil)
              }
  
              root.window?.makeKeyAndVisible()
  
              handled = true
          }
      }
      return handled
  }
  </code></pre>