I'm trying to go to any out of the 3 tab bar elements that I have in my storyboard depending on which quick action I select when 3D Touching on the app icon. I want to still be able to see the tab bar controller, which is where I've been struggling recently. Any help would be greatly appreciated.
Edit: I have got it to go to each separate Tab Bar Items.
I now need to activate the segue in each view, and here is the code that I'm using:
func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
let myTabBar = self.window?.rootViewController as? UITabBarController
let NavigationController = UINavigationController.self
if shortcutItem.type == "com.LukeB.Quick-Actions-Test.Three" {
myTabBar?.selectedIndex = 2
//Need to go to the segue with identifier SegueThree
}
if shortcutItem.type == "com.LukeB.Quick-Actions-Test.Two" {
myTabBar?.selectedIndex = 1
//Need to go to the segue with identifier SegueThree
}
if shortcutItem.type == "com.LukeB.Quick-Actions-Test.One" {
myTabBar?.selectedIndex = 0
//Need to go to the segue with identifier SegueOne
}
}