I wanted to use SF's monospaced digits font to display an integer number in a text field by changing its font as follows:
textField.font = UIFont.monospacedDigitSystemFont(textField.font!.pointSize, weight: UIFont.Weight.semibold)
But if I set the text of the text field in a 60Hz frequency, this is the result:
The width of the text is clearly not constant for a same amount of digits so it is moving all jittery because the text field is constrained to "leading" and "trailing" of the image underneath. Why is this the case and how to fix it?
Another truly monospaced font like "Menlo" is behaving correctly:
UILabel
constrained in its width (with "adjust to fit" enabled) – Erlond