Skip to content

Commit

Permalink
Set sourceView
Browse files Browse the repository at this point in the history
Otherwise iPad would crash, this is awful :( why would Apple do that?
  • Loading branch information
Michael Scoff committed Dec 10, 2017
1 parent b842677 commit 5609ead
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Trust/Accounts/Coordinators/AccountsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion Trust/Core/Coordinators/CheckDeviceCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5609ead

Please sign in to comment.