From 5609eadfd6db7708a15057f9b63ea8394594ffe4 Mon Sep 17 00:00:00 2001 From: Michael Scoff Date: Sat, 9 Dec 2017 22:44:02 -0800 Subject: [PATCH] Set sourceView Otherwise iPad would crash, this is awful :( why would Apple do that? --- Trust/Accounts/Coordinators/AccountsCoordinator.swift | 1 + Trust/Core/Coordinators/CheckDeviceCoordinator.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Trust/Accounts/Coordinators/AccountsCoordinator.swift b/Trust/Accounts/Coordinators/AccountsCoordinator.swift index b4eea6f5f..be08dbecd 100644 --- a/Trust/Accounts/Coordinators/AccountsCoordinator.swift +++ b/Trust/Accounts/Coordinators/AccountsCoordinator.swift @@ -58,6 +58,7 @@ class AccountsCoordinator: Coordinator { func showInfoSheet(for account: Account) { let controller = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) + controller.popoverPresentationController?.sourceView = navigationController.view let actionTitle = NSLocalizedString("wallets.backup.backup-action.title", value: "Backup Keystore", comment: "The title of the backup button in the wallet's action sheet") let action = UIAlertAction(title: actionTitle, style: .default) { _ in let coordinator = BackupCoordinator( diff --git a/Trust/Core/Coordinators/CheckDeviceCoordinator.swift b/Trust/Core/Coordinators/CheckDeviceCoordinator.swift index a10a35f33..ee8e5336c 100644 --- a/Trust/Core/Coordinators/CheckDeviceCoordinator.swift +++ b/Trust/Core/Coordinators/CheckDeviceCoordinator.swift @@ -20,7 +20,7 @@ class CheckDeviceCoordinator: Coordinator { ), preferredStyle: UIAlertControllerStyle.alert ) - + controller.popoverPresentationController?.sourceView = navigationController.view controller.addAction(UIAlertAction(title: NSLocalizedString("jailbreak.submit", value: "Got it", comment: ""), style: .default)) return controller