I guess your label's textAlignment
property is NSTextAlignmentCenter
, Try to set the label's textAlignment
property to NSTextAlignmentLeft
or NSTextAlignmentRight
.
Displaying a double in a label that contains time makes the position jumpy
-
23-07-2023 - |
Question
I couldn't think of a better way to title this, so hopefully the description helps.
I have a game in which the elapsed time is displayed at the top. As the time changes, different numbers have different physical sizes, so the physical length of the label changes very slightly for each fraction of a second. This makes it so the whole number doesn't appear to stay in the same place, and instead looks like it's vibrating in place. How can I make it so the displayed label appears more steady?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow