Skip to content

3.0.0

Compare
Choose a tag to compare
@quanshousio quanshousio released this 11 Apr 17:16
· 10 commits to main since this release
b064788

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 of DefaultToastViewStyle is center-aligned.
  • API changes:
    • IndefiniteProgressToastViewStyle is renamed to IndeterminateProgressToastViewStyle.
    • DefiniteProgressToastViewStyle is renamed to DeterminateProgressToastViewStyle.
    • ErrorToastViewStyle is renamed to FailureToastViewStyle.
    • InfoToastViewStyle is renamed to InformationToastViewStyle.
    • AnyToastViewStyle is marked as private.
    • ToastViewStyleConfiguration properties are refactored to use a generic type instead of AnyView.
    • VisualEffectView and cocoaBlur modifier are removed. Use blur or background with Material 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).

Fixed

  • ToastUI fails to present the toast when there is a presented view controller (#21 and #24).
  • Compiler warning for missing the metatype in EnvironmentValues.toastViewStyle (#26).