iOS Devs: First, thank you for supporting Dynamic Type (you are, right?).
-
iOS Devs: First, thank you for supporting Dynamic Type (you are, right?). Next, bring this gist into your project and change `label.text = string` to `label.attributedText = string. withHyphenationEnabled()` wherever the text may take 2+ lines. Not only will it look super professional (especially at larger content sizes), it fits more text on screen, making it easier to actually read.
(Yes, it is bare bones, feel free to incorporate as you see fit.)
Very basic implementation of enabling hyphenation for text.
Very basic implementation of enabling hyphenation for text. - String+Hyphenation.swift
Gist (gist.github.com)
-
@pgor I cannot boost this hard enough.
Copyright © 2024 NodeBB | Contributors