Hi there,
I worked through the exercise for dynamic type to scale after app comes back into foreground after changing the dynamic type size. Did the following in AppDelegate.swift :
func applicationWillEnterForeground(_ application: UIApplication) {
// Dynamic type update table view
let searchViewController = window!.rootViewController as! SearchViewController
searchViewController.tableView.reloadData()
// Dynamic Type update DetailView that might be open
if let detailViewController = searchViewController.presentedViewController as? DetailViewController {
detailViewController.updateUI()
}
}
Pretty straight forward I guess ? I added the update of the detail view as well but to really make it work I had to call
someLabel.font = UIFont.preferredFont(forTextStyle: …)
for every label to make it work, without that the view would not update automatically.
Is there something I am missing here ? This does not seem to be scalable with adding more and more screens you would have to take care of whether that view is currently presented and call the according method.
Cheers,
Mark