Skip to content

v2.0.0

Compare
Choose a tag to compare
@lascic lascic released this 21 Jun 19:48
· 8 commits to main since this release

UIOnboarding v2.0.0 improves support for localized welcome titles.

Changes

• Enable dynamic font size scaling for UIOnboardingTitleLabel.
• Split the welcome title label into two separate UIOnboardingTitleLabel instances within a UIOnboardingTitleLabelStack for dynamic sizing.
• The welcomeTitle parameter inside UIOnboardingViewConfiguration is now being separated into two parameters, allowing to specifically set the text for each title line label when needed.
• These new parameters now have generalized names, firstTitleLine and secondTitleLine.

Discussion

If a localization only needs one title line (e.g. in another language), you can leave either one of the two new parameters as an empty string. The new title label stack view automatically adjusts its height.

// First Title Line
// App Name
static func setUpFirstTitleLine() -> NSMutableAttributedString {
    return .init(string: Bundle.main.displayName ?? "Distintivos", attributes: [
            .foregroundColor: UIColor.init(named: "camou")!
    ])
}

// Second Title Line
// Empty
static func setUpSecondTitleLine() -> NSMutableAttributedString {
    return .init(string: "")
}

Credits

I'd like to thank Felix Lisczyk, @FelixLisczyk, for his contribution.