The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
UIOnboarding 2.0.3 fixes a critical issue found in iOS and iPadOS 17 that can result in a crash (https://github.com/lascic/UIOnboarding/issues/15).
## Credits
I'd like to thank Felix Lisczyk, @FelixLisczyk, for his contribution (https://github.com/lascic/UIOnboarding/issues/19).
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](https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app) on how to add custom fonts to your project.
<img align="right" height="400" src="https://github.com/lascic/UIOnboarding/assets/34413704/29fb31b6-020b-48cc-af7e-f81d675e6451" alt="Simulator Screenshot">
```swift
// 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))
}
}
```
<br></br>
<img align="right" height="400" src="https://github.com/lascic/UIOnboarding/assets/34413704/e4442cd1-7ae8-4835-968c-7745ed03c4ee" alt="Simulator Screenshot">
Check out the new [`UIOnboardingFeatureStyle`](https://github.com/lascic/UIOnboarding/blob/2.0.2/Sources/UIOnboarding/Configuration/UIOnboardingFeature.swift) configuration. For instance, change the font size of the feature labels. UIOnboarding takes care of calculating the respective font sizes for Dynamic Type.
```swift
// UIOnboardingViewConfiguration.init()
featureStyle: .init(descriptionFontSize: 15),
```
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`.
``` swift
// 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())
}
}
```
<img src=https://user-images.githubusercontent.com/34413704/215310407-afc891d7-1058-48c7-9d18-8348e84bde60.png width=240>
Or if you choose to include a notice area, you must at least include a text string.
``` swift
// In UIOnboardingHelper.swift
static func setUpNotice() -> UIOnboardingTextViewConfiguration {
.init(text: "Developed and designed for members of the Swiss Armed Forces.")
}
```
<img src=https://user-images.githubusercontent.com/34413704/215310403-0493dda4-fb28-4a36-ae0b-2d89f3adf7d8.png width=240>
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.
``` swift
// 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.
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.
### 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.
### Improvements
• Fix font size changes on feature cell labels.
• 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.
• Initial release for iPhone and iPod touch.