BannerView

public struct BannerView : View

Slide down and up a banner view. There is no default background color.

Example of usage:

BannerView("Text to display")
      .onTapGesture {
          someError = nil
      }
}
  • Initializer

    Declaration

    Swift

    public init(_ text: String, type: BannerViewType = .error, closeIndicator: Bool = false)

    Parameters

    text

    text to display in banner

    type

    type deciding on visual representation details for the banner

    closeIndicator

    image to represent the capability of closing the banner

  • Declaration

    Swift

    public var body: some View { get }