You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now fonts throughout the app are not self-resizing. They only look at textStyle when created, and don't update when text sizing settings change. Currently some custom views subscribe to traitCollectionDidChange, where fonts are reapplied to the UI elements.
Fonts created via scaledFont(:) font function don't require additional logic to re-apply fonts on labels, as font objects themselves update internally.
Working on this ticket involves modifying dynamicFont(...) function and removing custom font re-application code currently sprinkled throughout the app.
Expected behaviour
When text size is changed in accessibility settings, views throughout the app update automatically to reflect the new text size.
How does it improve the project?
Using a native solution to the problem and having less custom code in the app increases maintainability of the codebase.
Summary
Right now fonts throughout the app are not self-resizing. They only look at
textStyle
when created, and don't update when text sizing settings change. Currently some custom views subscribe totraitCollectionDidChange
, where fonts are reapplied to the UI elements.Fonts created via scaledFont(:) font function don't require additional logic to re-apply fonts on labels, as font objects themselves update internally.
Working on this ticket involves modifying
dynamicFont(...)
function and removing custom font re-application code currently sprinkled throughout the app.Expected behaviour
When text size is changed in accessibility settings, views throughout the app update automatically to reflect the new text size.
How does it improve the project?
Using a native solution to the problem and having less custom code in the app increases maintainability of the codebase.
Moved from Trello:
https://trello.com/c/mOaYUyR2/88-implement-self-resizing-fonts-using-scaledfont
The text was updated successfully, but these errors were encountered: