diff --git a/Passepartout-iOS/Scenes/Organizer/ShortcutsAddViewController.swift b/Passepartout-iOS/Scenes/Organizer/ShortcutsAddViewController.swift index b9211984..0eb22000 100644 --- a/Passepartout-iOS/Scenes/Organizer/ShortcutsAddViewController.swift +++ b/Passepartout-iOS/Scenes/Organizer/ShortcutsAddViewController.swift @@ -201,4 +201,8 @@ class ShortcutsAddViewController: UITableViewController, TableModelHost { private func addShortcut(with intent: INIntent) { delegate?.shortcutsDidSelectIntent(intent: intent) } + + @IBAction private func close() { + dismiss(animated: true, completion: nil) + } } diff --git a/Passepartout-iOS/Scenes/Organizer/ShortcutsViewController.swift b/Passepartout-iOS/Scenes/Organizer/ShortcutsViewController.swift index 9686baf3..6d318273 100644 --- a/Passepartout-iOS/Scenes/Organizer/ShortcutsViewController.swift +++ b/Passepartout-iOS/Scenes/Organizer/ShortcutsViewController.swift @@ -119,7 +119,7 @@ class ShortcutsViewController: UITableViewController, INUIAddVoiceShortcutViewCo // MARK: Actions override func prepare(for segue: UIStoryboardSegue, sender: Any?) { - if let vc = segue.destination as? ShortcutsAddViewController { + if let nav = segue.destination as? UINavigationController, let vc = nav.topViewController as? ShortcutsAddViewController { vc.delegate = self } } @@ -216,7 +216,7 @@ class ShortcutsViewController: UITableViewController, INUIAddVoiceShortcutViewCo func shortcutsDidSelectIntent(intent: INIntent) { pendingShortcut = INShortcut(intent: intent) - navigationController?.popToViewController(self, animated: true) + dismiss(animated: true, completion: nil) } // MARK: INUIAddVoiceShortcutViewControllerDelegate diff --git a/Passepartout-iOS/en.lproj/Shortcuts.storyboard b/Passepartout-iOS/en.lproj/Shortcuts.storyboard index 13cc1afb..4e822a8b 100644 --- a/Passepartout-iOS/en.lproj/Shortcuts.storyboard +++ b/Passepartout-iOS/en.lproj/Shortcuts.storyboard @@ -1,35 +1,55 @@ + + + + + + + + + + + + + + + + + + + + - + - + - + - + + + + + + + @@ -58,26 +84,26 @@ - + - + - + - +