Fix dynamic font size in settings vie

This commit is contained in:
Mingshen Sun 2019-11-17 20:29:22 -08:00
parent bcf7f5fcca
commit 70c887427a
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -152,11 +152,16 @@ class SettingsTableViewController: UITableViewController, UITabBarControllerDele
setPasscodeLockCell()
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = super.tableView(tableView, cellForRowAt: indexPath)
cell.textLabel?.font = UIFont.preferredFont(forTextStyle: .body)
cell.textLabel?.adjustsFontForContentSizeCategory = true
cell.detailTextLabel?.adjustsFontForContentSizeCategory = true
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
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 {