3.0.0
Released on 2022-04-11.
Changed
- Minimum required version for Swift is 5.5.
- Visual changes:
- ToastUI shows a dimmed background when presenting a toast instead of a blurred background. This replicates the behavior of a normal
UIAlertController
. - Multi-line text alignment for
Label
ofDefaultToastViewStyle
is center-aligned.
- ToastUI shows a dimmed background when presenting a toast instead of a blurred background. This replicates the behavior of a normal
- API changes:
IndefiniteProgressToastViewStyle
is renamed toIndeterminateProgressToastViewStyle
.DefiniteProgressToastViewStyle
is renamed toDeterminateProgressToastViewStyle
.ErrorToastViewStyle
is renamed toFailureToastViewStyle
.InfoToastViewStyle
is renamed toInformationToastViewStyle
.AnyToastViewStyle
is marked as private.ToastViewStyleConfiguration
properties are refactored to use a generic type instead ofAnyView
.VisualEffectView
andcocoaBlur
modifier are removed. Useblur
orbackground
withMaterial
on iOS 15.0+ modifiers if possible.
- Toast presentation and dismissal mechanisms are redesigned:
- On iOS and tvOS, toast is presented in a separate window instead of the view controller where it is called.
- On macOS, toast is presented in the same window where it is called instead of a separate sheet.
- On watchOS, toast is presented using the built-in
sheet
modifier due to the limitation of WatchKit APIs. - The new mechanism should be more robust against failures and warns the user appropriately if a failure occurs.
- DocC replaces Jazzy as the new tool for generating documentation.
- Support for CocoaPods dependency manager is removed. Use Swift Package Manager instead.
- Default git branch is renamed to
main
.
Added
- Support for watchOS. Minimum required version for watchOS is 7.0
- Static property/function for all built-in styles to leverage the new static member lookup functionality.
toastDimmedBackground
modifier for enabling or disabling the dimmed background.IconToastViewStyle
style for showing a toast with an icon and a headline text label.
Updated
ToastUISample
is reorganized and include new examples.- GitHub actions are streamlined and updated (#25).