Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.