Created
May 17, 2020 12:06
-
-
Save popcornomnom/1b756e41f1253df0dd2790e5d4dab5b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { | |
///Update fonts after dynamic fonts settings was changed | |
if traitCollection.preferredContentSizeCategory != previousTraitCollection?.preferredContentSizeCategory { | |
setFonts() | |
} | |
} | |
private func setFonts() { | |
title.font = UIFont(.h3, .black) | |
subtitle.font = UIFont(.bodyM, .medium) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment