From 8d60492b947ba5096adf5d875a347fd12b48f1f9 Mon Sep 17 00:00:00 2001 From: Johandre Delgado Date: Fri, 27 Aug 2021 21:34:20 +0300 Subject: [PATCH] Optimise Settings screen for dynamic type (#908) (#910) Co-authored-by: Pierre Slamich --- .../SettingsTableViewController.swift | 10 + Sources/Views/Settings/Settings.storyboard | 1757 +++++++++-------- 2 files changed, 896 insertions(+), 871 deletions(-) diff --git a/Sources/ViewControllers/Settings/SettingsTableViewController.swift b/Sources/ViewControllers/Settings/SettingsTableViewController.swift index 3d79a7ce4b9..75db9ce2139 100644 --- a/Sources/ViewControllers/Settings/SettingsTableViewController.swift +++ b/Sources/ViewControllers/Settings/SettingsTableViewController.swift @@ -34,12 +34,14 @@ class SettingsTableViewController: UITableViewController, MFMailComposeViewContr @IBOutlet weak var creditsCell: UITableViewCell! @IBOutlet weak var contactCell: UITableViewCell! + @IBOutlet weak var bottomLink: UIButton! var dataManager: DataManagerProtocol! override func viewDidLoad() { super.viewDidLoad() self.title = "settings.tab-bar.item".localized + configureForDynamicType() } override func viewWillAppear(_ animated: Bool) { @@ -149,3 +151,11 @@ class SettingsTableViewController: UITableViewController, MFMailComposeViewContr controller.dismiss(animated: true, completion: nil) } } + +private extension SettingsTableViewController { + func configureForDynamicType() { + tableView.rowHeight = UITableView.automaticDimension + tableView.estimatedRowHeight = 200 + bottomLink.titleLabel?.adjustsFontForContentSizeCategory = true + } +} diff --git a/Sources/Views/Settings/Settings.storyboard b/Sources/Views/Settings/Settings.storyboard index bfae10c2183..f1988badd79 100644 --- a/Sources/Views/Settings/Settings.storyboard +++ b/Sources/Views/Settings/Settings.storyboard @@ -1,11 +1,12 @@ - + - + + @@ -16,9 +17,9 @@ - - - + - - -