Coder Social home page Coder Social logo

Comments (2)

lascic avatar lascic commented on August 21, 2024

My initial thought when first building UIOnboarding was that the order between the app name and "Welcome to" could be in reversed or mixed order for some other languages, for which I let other developers decide how to name it in only one single NSMutableAttributedString and UIOnboardingLabel instance.

Another thought behind this was that in Apple's Stocks onboarding screen the title label always has only two lines, regardless of Dynamic Type setting or not. And this is something I want to stick with UIOnboarding. Let's assume we have the label's text size set to XXXL in Dynamic Type on an iPhone SE (1st generation). First, it would have too many lines and second, the words would be clipped which is hard for users to read. I can imagine it to look too big to read during the short time where the app icon and app name label get animated in the beginning.

Since we have layout issues with line breaks I'd say we do it the way you suggested – which sounds good to me. Only thing I'd like to keep is the two line restriction with the fixed font size alongside adjustsFontSizeToFitWidth toggled (the font size of both labels in that stack view should be identical in any case with adjusted line spacing) and a minimumScaleFactor set.

from uionboarding.

FelixLisczyk avatar FelixLisczyk commented on August 21, 2024

Hi @lascic,

Thank you for sharing your thoughts. I've added the first draft of my implementation to PR #4. The changes are currently only included in the "UIOnboarding Demo" project.

I haven't found a solution for the requirement yet that the two labels should always have the same font size. As far as I know, UILabel does not update its fontSize property when it scales down the text. I assume we would have to calculate the largest possible font size manually and apply it to both labels. That would defeat the main purpose of the automatic scaling, though.

If you have any other ideas, please let me know. You can also make changes to the code in my PR directly. Thanks! 👌

from uionboarding.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.