From 95f1af35c7cc6c558a2f9740a5da48ebc9fd4740 Mon Sep 17 00:00:00 2001 From: Hwee-Boon Yar Date: Sun, 1 Dec 2019 16:02:34 +0800 Subject: [PATCH] Fix: text and button overlap on smaller devices in screen prompting to elevate key security --- .../ElevateWalletSecurityViewController.swift | 2 +- .../Wallet/ViewModels/ElevateWalletSecurityViewModel.swift | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AlphaWallet/Wallet/ViewControllers/ElevateWalletSecurityViewController.swift b/AlphaWallet/Wallet/ViewControllers/ElevateWalletSecurityViewController.swift index 06f851f31..715a26ba6 100644 --- a/AlphaWallet/Wallet/ViewControllers/ElevateWalletSecurityViewController.swift +++ b/AlphaWallet/Wallet/ViewControllers/ElevateWalletSecurityViewController.swift @@ -45,7 +45,7 @@ class ElevateWalletSecurityViewController: UIViewController { subtitleLabel, UIView.spacer(height: 40), imageView, - UIView.spacer(height: 40), + UIView.spacer(height: ScreenChecker().isNarrowScreen ? 15 : 40), descriptionLabel, ].asStackView(axis: .vertical) stackView.translatesAutoresizingMaskIntoConstraints = false diff --git a/AlphaWallet/Wallet/ViewModels/ElevateWalletSecurityViewModel.swift b/AlphaWallet/Wallet/ViewModels/ElevateWalletSecurityViewModel.swift index c0a98187f..6a9941e25 100644 --- a/AlphaWallet/Wallet/ViewModels/ElevateWalletSecurityViewModel.swift +++ b/AlphaWallet/Wallet/ViewModels/ElevateWalletSecurityViewModel.swift @@ -51,7 +51,11 @@ struct ElevateWalletSecurityViewModel { } var descriptionFont: UIFont { - return Fonts.regular(size: 20)! + if ScreenChecker().isNarrowScreen { + return Fonts.regular(size: 16)! + } else { + return Fonts.regular(size: 20)! + } } var cancelLockingButtonFont: UIFont {