-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable dynamic font size scaling for title label #4
Conversation
If either the welcome or app name label is smaller than the initial font size (set in UIOnboardingViewController), apply the font that is smaller (to keep them the same).
I managed to implement the logic for adjusting the font size if either the welcome text or app name text gets smaller so that the smaller font size gets applied for both title labels in the stack. The line height looks still alright to me, no need to change something there. |
Rename welcomeTitle and appTitle input parameters as well as related properties to first- and secondTitleLine(-Label). In other localizations, the app name may be set on the first line followed by the welcome text on the second (and/or partially on first) line and vice versa.
This issue happened after transitioning from one welcome title label to a welcome title label stack. The parent onboarding stack height changes between view controller lifecycle and environment changes, which made the controller show the bottom blur even though there was enough space to show the full feature list. We call updateUI again after the initial onboarding animation has completed, reading the actual onboarding stack height and therefore correctly showing or hiding the bottom blur view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you! 👍
Prepare update for other demo projects
Make the parameter optional though, as this is only needed in case of poor contrast.
WIP for #3