From 33fd8c1475534144338c0f7f29df6cc78a08e15a Mon Sep 17 00:00:00 2001 From: dankito Date: Sat, 17 Oct 2020 19:53:06 +0200 Subject: [PATCH] Added app icon to LoginDialog. Had to add app icon separately as "AppIcon" imageset is not referencable during runtime (with a trick at lease AppIcon60x60 but that was too small) --- .../AppIconInApp.imageset/Contents.json | 12 +++++++++++ .../AppIconInApp.imageset/icon-ios.svg | 21 +++++++++++++++++++ .../ui/dialogs/LoginDialog.swift | 6 ++++++ 3 files changed, 39 insertions(+) create mode 100644 ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/Contents.json create mode 100644 ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/icon-ios.svg diff --git a/ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/Contents.json b/ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/Contents.json new file mode 100644 index 00000000..c2f9a034 --- /dev/null +++ b/ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "icon-ios.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/icon-ios.svg b/ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/icon-ios.svg new file mode 100644 index 00000000..be6d0dff --- /dev/null +++ b/ui/BankingiOSApp/BankingiOSApp/Assets.xcassets/AppIconInApp.imageset/icon-ios.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift index c2b1f321..941f4f2b 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/LoginDialog.swift @@ -38,6 +38,12 @@ struct LoginDialog: View { var body: some View { VStack { Spacer() + + Image("AppIconInApp") + .resizable() + .frame(width: 80, height: 80) + .padding(.top, allowCancellingLogin ? 80 : 30) + .padding(.bottom, 6) Text(authenticationReason) .multilineTextAlignment(.center)