Skip to content

Instantly share code, notes, and snippets.

View popcornomnom's full-sized avatar
:octocat:

Rita Lytvynenko popcornomnom

:octocat:
View GitHub Profile
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)