Add a Done button to exit connect shortcuts

This commit is contained in:
Davide De Rosa 2019-03-18 22:40:06 +01:00
parent 1913468ea6
commit 88a1e39a6e
2 changed files with 12 additions and 0 deletions

View File

@ -182,6 +182,10 @@ extension ShortcutsConnectToViewController {
private func pickProviderLocation() { private func pickProviderLocation() {
perform(segue: StoryboardSegue.Shortcuts.pickLocationSegueIdentifier) perform(segue: StoryboardSegue.Shortcuts.pickLocationSegueIdentifier)
} }
@IBAction private func done() {
dismiss(animated: true, completion: nil)
}
} }
extension ShortcutsConnectToViewController: ProviderPoolViewControllerDelegate { extension ShortcutsConnectToViewController: ProviderPoolViewControllerDelegate {
@ -196,6 +200,7 @@ extension ShortcutsConnectToViewController: ProviderPoolViewControllerDelegate {
@available(iOS 12, *) @available(iOS 12, *)
extension ShortcutsConnectToViewController: INUIAddVoiceShortcutViewControllerDelegate { extension ShortcutsConnectToViewController: INUIAddVoiceShortcutViewControllerDelegate {
func addVoiceShortcutViewController(_ controller: INUIAddVoiceShortcutViewController, didFinishWith voiceShortcut: INVoiceShortcut?, error: Error?) { func addVoiceShortcutViewController(_ controller: INUIAddVoiceShortcutViewController, didFinishWith voiceShortcut: INVoiceShortcut?, error: Error?) {
navigationController?.popViewController(animated: true)
dismiss(animated: true, completion: nil) dismiss(animated: true, completion: nil)
} }

View File

@ -102,6 +102,13 @@
<outlet property="delegate" destination="zpj-mS-isI" id="zex-yh-op8"/> <outlet property="delegate" destination="zpj-mS-isI" id="zex-yh-op8"/>
</connections> </connections>
</tableView> </tableView>
<navigationItem key="navigationItem" id="kUu-WC-MJQ">
<barButtonItem key="rightBarButtonItem" style="done" systemItem="done" id="m8u-XK-MLx">
<connections>
<action selector="done" destination="zpj-mS-isI" id="f5U-ko-QS3"/>
</connections>
</barButtonItem>
</navigationItem>
<connections> <connections>
<segue destination="bPc-ex-Jwe" kind="show" identifier="PickLocationSegueIdentifier" id="ah9-pc-zoh"/> <segue destination="bPc-ex-Jwe" kind="show" identifier="PickLocationSegueIdentifier" id="ah9-pc-zoh"/>
</connections> </connections>