Releases: lascic/UIOnboarding
v2.0.4
v2.0.3
v2.0.2
UIOnboarding 2.0.2 introduces custom font- (#13) and feature list styling (#8, #13) and resolves layout issues (#10).
Discussion
Simply provide the PostScript name of your custom font in the view's configuration. For the title labels pass the UIFont directly as an attribute to the string. UIOnboarding handles correct font sizing, scaling for Dynamic Type and fallback to system default.
Read more on how to add custom fonts to your project.
// UIOnboardingHelper.swift
// Second Title Line
// App Name
static func setUpSecondTitleLine() -> NSMutableAttributedString {
let secondTitle: NSMutableAttributedString = .init(string: Bundle.main.displayName ?? "Insignia")
secondTitle.addAttribute(.foregroundColor,
value: UIColor.init(named: "camou") ?? UIColor.init(red: 0.654, green: 0.618, blue: 0.494, alpha: 1.0),
range: .init(location: 0, length: secondTitle.length))
guard let customFont: UIFont = .init(name: "Akkurat-Bold", size: UIFont.labelFontSize) else {
return secondTitle
}
secondTitle.addAttribute(.font,
value: customFont,
range: .init(location: 0, length: secondTitle.length))
return secondTitle
}
// Continue Button
static func setUpButton() -> UIOnboardingButtonConfiguration {
.init(title: "Continue",
fontName: "Akkurat-bold",
backgroundColor: .init(named: "camou") ?? UIColor.init(red: 0.654, green: 0.618, blue: 0.494, alpha: 1.0))
}
}
Check out the new UIOnboardingFeatureStyle
configuration. For instance, change the font size of the feature labels. UIOnboarding takes care of calculating the respective font sizes for Dynamic Type.
// UIOnboardingViewConfiguration.init()
featureStyle: .init(descriptionFontSize: 15),
v2.0.1
UIOnboarding v2.0.1 adds a fix for oversized notice icons and makes notice configuration optional.
Changes
• Improves constraint layouts for onboardingNoticeIcon
(#7).
• Makes icon
optional in UIOnboardingTextViewConfiguration
, giving more room for customisation.
• UIOnboardingTextViewConfiguration
is now optional with the option to completely hide it (#11).
Discussion
Adjust the notice area based on your app's needs. You can either leave it out completely by removing textViewConfiguration
.
// In UIOnboardingHelper.swift
extension UIOnboardingViewConfiguration {
static func setUp() -> UIOnboardingViewConfiguration {
.init(appIcon: UIOnboardingHelper.setUpIcon(),
firstTitleLine: UIOnboardingHelper.setUpFirstTitleLine(),
secondTitleLine: UIOnboardingHelper.setUpSecondTitleLine(),
features: UIOnboardingHelper.setUpFeatures(),
// textViewConfiguration: UIOnboardingHelper.setUpNotice(),
buttonConfiguration: UIOnboardingHelper.setUpButton())
}
}
Or if you choose to include a notice area, you must at least include a text string.
// In UIOnboardingHelper.swift
static func setUpNotice() -> UIOnboardingTextViewConfiguration {
.init(text: "Developed and designed for members of the Swiss Armed Forces.")
}
v2.0.0
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.
v1.1.3
Version 1.1.3 addresses a crucial performance issue.
This has been fixed with improved conditionals within interface environment changes.
Improvements
• Fix infinite loop caused by updateUI()
on viewDidLayoutSubviews()
Credits
I'd like to thank Felix Lisczyk, @FelixLisczyk, for his contribution.
v1.1.2
Improvements
• Continuous corner curves
• Enable dynamic pointer effect on continue button
• Improve support for Mac Catalyst
Credits
I'd like to thank Ethan Lipnik, @EthanLipnik, for his contribution.
v1.1.1
v1.1.0
• Add iPad support for all size classes and interface orientations, including Split View and Slide Over.
Improvements
• Improve continue button size adaptivity based on user's Dynamic Type setting.
• Separate feature cell label into two labels for better distinction in VoiceOver.
• Animate bottom blur view in and out based on scroll position.
• Fix scroll view indicator inset issue.