From 8be54564e4c6de1448a3c6cea5ee376ee067f1a5 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 27 Apr 2019 10:49:54 -0500 Subject: [PATCH] Enable dynamic type on detail view. --- iOS/Detail/DetailViewController.swift | 6 +++++- iOS/Resources/styleSheet.css | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/iOS/Detail/DetailViewController.swift b/iOS/Detail/DetailViewController.swift index b8088d4c0..f60c8f5e3 100644 --- a/iOS/Detail/DetailViewController.swift +++ b/iOS/Detail/DetailViewController.swift @@ -38,7 +38,7 @@ class DetailViewController: UIViewController { NotificationCenter.default.addObserver(self, selector: #selector(statusesDidChange(_:)), name: .StatusesDidChange, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(articleSelectionDidChange(_:)), name: .ArticleSelectionDidChange, object: navState) NotificationCenter.default.addObserver(self, selector: #selector(progressDidChange(_:)), name: .AccountRefreshProgressDidChange, object: nil) - + NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange(_:)), name: UIContentSizeCategory.didChangeNotification, object: nil) } override func viewDidAppear(_ animated: Bool) { @@ -125,6 +125,10 @@ class DetailViewController: UIViewController { updateProgressIndicatorIfNeeded() } + @objc func contentSizeCategoryDidChange(_ note: Notification) { + reloadHTML() + } + // MARK: Actions @IBAction func nextUnread(_ sender: Any) { diff --git a/iOS/Resources/styleSheet.css b/iOS/Resources/styleSheet.css index 028a8da76..41bf84199 100644 --- a/iOS/Resources/styleSheet.css +++ b/iOS/Resources/styleSheet.css @@ -3,8 +3,7 @@ body { margin-bottom: 20px; margin-left: 20px; margin-right: 20px; - font-family: -apple-system-body; - font-size: 18px; + font: -apple-system-body; word-wrap: break-word; word-break: break-word;