Latest 0.1.0
Homepage https://github.com/vberihuete/DCToastView
License MIT
Platforms ios 11.0
Authors

CI Status
Version
License
Platform

A Toast View made in swift using auto layout and stack views.

sample gif

Example

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

Requirements

iOS 11 or above and swift 4.2

Installation

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

pod 'DCToastView'

How to

After you have your cocoapods set up done and already added the pod for DCToastView, you just need to import in the View Controller you will like to use the Filter View.

import DCToastView

Then just call the shared Toast Presenter instance to show or remove a toast message

ToastPresenter.shared.show(in: self.view, message: "This is a toast")
ToastPresenter.shared.remove()

Constructor properties go as follows:

  • view: The view in which the toast is going to be presented
  • message: The message that the toast will show
  • toastPlace: The place which can be .down or .up
  • backgroundColor: The background color of the toast; defaults to black
  • textColor: The text color of the message; defaults to white
  • timeOut: The amount of seconds for the toast to dismiss if not provided it means that the toast will be sticky (will remain until touched); defaults to nil
  • roundness: How round the toast will be: .none, .low, .mid, .high; defaults to .mid

Author

Vincent Berihuete, [email protected]

License

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

Latest podspec

{
    "name": "DCToastView",
    "version": "0.1.0",
    "summary": "A Toast View made in swift using auto layout and stack views",
    "description": "This is part of the DC UI libraries to handle a simple Stack view and Auto layout friendly Toast View",
    "homepage": "https://github.com/vberihuete/DCToastView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "vberihuete": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vberihuete/DCToastView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "11.0"
    },
    "swift_version": "4.2",
    "source_files": "DCToastView/Classes/**/*"
}

Pin It on Pinterest

Share This