Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Optimise Settings screen for dynamic type (#908) (#910)
Browse files Browse the repository at this point in the history
Co-authored-by: Pierre Slamich <[email protected]>
  • Loading branch information
bigimot22 and teolemon authored Aug 27, 2021
1 parent 12133c9 commit 8d60492
Show file tree
Hide file tree
Showing 2 changed files with 896 additions and 871 deletions.
10 changes: 10 additions & 0 deletions Sources/ViewControllers/Settings/SettingsTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
}
}
Loading

0 comments on commit 8d60492

Please sign in to comment.