feat: turn methods private and fix text moving depending on number te… #178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using the slider for device battery, I saw a common problem: all the text around was moving when the number is changing.
So, for fix this, I added a font modifier with
monospacedDigit()
in the Apple's documentation it is saying:Returns: A font that uses fixed-width numeric characters.
Before the patch
Screen.Recording.2023-11-28.at.21.41.22.mov
After the patch
Screen.Recording.2023-11-28.at.21.38.18.mov
All text is only moving when the slider value goes from 9 to 10 and 99 to 100.
I thought to add animation as the one on the Apple Watch but it is too much for a developer software.
Access control
I declared method on the view as private for being more comprehensive by the compilator and maybe win some milliseconds at build time.
If you see something to improve let me know about it.