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

Optimise Settings screen for dynamic type (#908) #910

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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