I'd like to launch my app via a 3D touch quick action, and have it launch to a view that has a back button to my main view.
Here are the views:
The one with the table is my main view, if you tap that, it presents the view to the right, with a back button to the main view. However if I launch just the second view via AppDelegate, obviously the nav bar is gone, along with any way to get back to that previous view.
I wanted to avoid manually adding buttons, as it would detract from the natural feel.
let mainStoryboard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let initialViewController : UIViewController = mainStoryboard.instantiateViewController(withIdentifier: "secondView") as UIViewController
let nav = UINavigationController(rootViewController: initialViewController)
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window?.rootViewController = nav
self.window?.makeKeyAndVisible()
This gives the nav bar, but no back button (which is expected).
My question is, how to I make it so it simulates the user tapping on the table cell, so it shows the second view, with both a button and a swipe-to-go-back to go back to the previous view.
