diff --git a/Tusker/Screens/Timeline/TimelineGapCollectionViewCell.swift b/Tusker/Screens/Timeline/TimelineGapCollectionViewCell.swift index b2b39fed..49113843 100644 --- a/Tusker/Screens/Timeline/TimelineGapCollectionViewCell.swift +++ b/Tusker/Screens/Timeline/TimelineGapCollectionViewCell.swift @@ -44,6 +44,7 @@ class TimelineGapCollectionViewCell: UICollectionViewCell { let label = UILabel() label.text = "Load more" label.font = .preferredFont(forTextStyle: .headline) + label.adjustsFontForContentSizeCategory = true label.textColor = .tintColor chevronView.update(direction: .above) diff --git a/Tusker/Views/Toast/ToastConfiguration.swift b/Tusker/Views/Toast/ToastConfiguration.swift index cf113e32..024bf35b 100644 --- a/Tusker/Views/Toast/ToastConfiguration.swift +++ b/Tusker/Views/Toast/ToastConfiguration.swift @@ -11,7 +11,7 @@ import Pachyderm struct ToastConfiguration { var systemImageName: String? - var titleFont: UIFont = .boldSystemFont(ofSize: 14) + var titleFont: UIFont = UIFontMetrics(forTextStyle: .body).scaledFont(for: .boldSystemFont(ofSize: 14)) var title: String var subtitle: String? var actionTitle: String? diff --git a/Tusker/Views/Toast/ToastView.swift b/Tusker/Views/Toast/ToastView.swift index 86834be4..3ad95b85 100644 --- a/Tusker/Views/Toast/ToastView.swift +++ b/Tusker/Views/Toast/ToastView.swift @@ -68,13 +68,15 @@ class ToastView: UIView { titleLabel.textColor = .white titleLabel.font = configuration.titleFont titleLabel.adjustsFontSizeToFitWidth = true + titleLabel.adjustsFontForContentSizeCategory = true if let subtitle = configuration.subtitle { let subtitleLabel = UILabel() subtitleLabel.text = subtitle subtitleLabel.textColor = .white subtitleLabel.numberOfLines = 0 - subtitleLabel.font = .systemFont(ofSize: 14) + subtitleLabel.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 14)) + subtitleLabel.adjustsFontForContentSizeCategory = true let vStack = UIStackView(arrangedSubviews: [ titleLabel, subtitleLabel @@ -89,7 +91,8 @@ class ToastView: UIView { if let actionTitle = configuration.actionTitle { let actionLabel = UILabel() actionLabel.text = actionTitle - actionLabel.font = .boldSystemFont(ofSize: 16) + actionLabel.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .boldSystemFont(ofSize: 16)) + actionLabel.adjustsFontForContentSizeCategory = true actionLabel.textColor = .white stack.addArrangedSubview(actionLabel) }