Skip to content

Instantly share code, notes, and snippets.

@marinofelipe
Last active March 13, 2019 03:52
Show Gist options
  • Save marinofelipe/8ab48b7e75f61b1959702e35260b650d to your computer and use it in GitHub Desktop.
Save marinofelipe/8ab48b7e75f61b1959702e35260b650d to your computer and use it in GitHub Desktop.
Blog post / Dynamic Type - Final usage for custom fonts and auto updating views
@IBOutlet weak var outletLabel: UILabel!
private lazy var titleLabel: UILabel = UILabel.scaledTitle
private func setupLabels() {
view.addSubview(titleLabel)
outletLabel.font = UIFont.jurassicPark.bold.scaled(forTextStyle: .body, maxSize: 30.0)
outletLabel.text = "Dinosaur"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment