Fix UI issue

Dynamic type in Settings view in storyboard does not work.
Enable dynamic font manually in source code.
This commit is contained in:
Mingshen Sun 2019-11-17 17:52:31 -08:00
parent b9edcea214
commit bcf7f5fcca
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -153,13 +153,18 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
} }
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if tableView.cellForRow(at: indexPath) == passcodeTableViewCell { let cell = tableView.cellForRow(at: indexPath)
cell?.textLabel?.font = UIFont.preferredFont(forTextStyle: .body)
cell?.textLabel?.adjustsFontForContentSizeCategory = true
cell?.detailTextLabel?.adjustsFontForContentSizeCategory = true
if cell == passcodeTableViewCell {
if passcodeLock.hasPasscode { if passcodeLock.hasPasscode {
showPasscodeActionSheet() showPasscodeActionSheet()
} else { } else {
setPasscodeLock() setPasscodeLock()
} }
} else if tableView.cellForRow(at: indexPath) == pgpKeyTableViewCell { } else if cell == pgpKeyTableViewCell {
showPGPKeyActionSheet() showPGPKeyActionSheet()
} }
tableView.deselectRow(at: indexPath, animated: true) tableView.deselectRow(at: indexPath, animated: true)