LOGO

TSnackBarView

TSnackBarView is a simple and flexible UI component fully written in Swift. TSnackBarView helps you to show snackbar easily with 3 styles: normal, successful and error

Swift 5.0 Version License Platform Email

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

TSnackBarView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TSnackBarView'

Usage

import TSnackBarView

To show TSnackBarView with a normal message:

TSnackBarServiceImpl.shared.show(on: view,
    message: "Normal SnackBar View\nPlease use Normal SnackBar View for displaying normal text message.",
    onTapCloseAction: { snackBarView in
        snackBarView.dismiss()
    })

To show TSnackBarView with a successfull message:

TSnackBarServiceImpl.shared.show(on: view,
    message: "Success SnackBar View\nPlease use Success SnackBar View for displaying success text message.",
    style: .success,
    onTapCloseAction: { snackBarView in
            snackBarView.dismiss()
    })

To show TSnackBarView with a error message:

TSnackBarServiceImpl.shared.show(on: view,
    message: "Error SnackBar View\nPlease use Error SnackBar View for displaying error text message.",
    style: .error,
    onTapCloseAction: { snackBarView in
            snackBarView.dismiss()
    })

alt text

Requirements

  • iOS 10.0 or later
  • Swift 5.0 or later

Author

fanta1ty, [email protected]

License

TSnackBarView is available under the MIT license. See the LICENSE file for more info.

GitHub

View Github