From bf9c0bc32b5bba880e610c5631813ec81d512b1a Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 8 Oct 2020 16:58:43 +0200 Subject: [PATCH] Implemented adding print option to shared data --- .../ui/dialogs/BankAccountSettingsDialog.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift index b25848d2..1cfa03e6 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/BankAccountSettingsDialog.swift @@ -129,8 +129,12 @@ struct BankAccountSettingsDialog: View { accountData.append("\n" + "Bank code \(account.bank.bankCode)".localize()) accountData.append("\n" + "Account number \(account.identifier)".localize()) + let attributes = [NSAttributedString.Key : Any]() + let string = NSAttributedString(string: accountData, attributes: attributes) + let print = UISimpleTextPrintFormatter(attributedText: string) - let activityViewController = UIActivityViewController(activityItems: [accountData], applicationActivities: nil) + + let activityViewController = UIActivityViewController(activityItems: [ accountData, print ], applicationActivities: nil) let viewController = SceneDelegate.rootViewController