Hack around UIKit bug in static tables with dynamic type
This commit is contained in:
parent
97c62f7546
commit
df43dad23e
|
@ -16,6 +16,12 @@ class SettingsViewController: UITableViewController {
|
|||
|
||||
weak var presentingParentController: UIViewController?
|
||||
|
||||
override func viewDidLoad() {
|
||||
// This hack mostly works around a bug in static tables with dynamic type. See: https://spin.atomicobject.com/2018/10/15/dynamic-type-static-uitableview/
|
||||
NotificationCenter.default.removeObserver(tableView!, name: UIContentSizeCategory.didChangeNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil)
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
|
@ -88,6 +94,10 @@ class SettingsViewController: UITableViewController {
|
|||
}
|
||||
}
|
||||
|
||||
@objc func contentSizeCategoryDidChange() {
|
||||
tableView.reloadData()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: OPML Document Picker
|
||||
|
|
Loading…
Reference in New Issue