Latest 1.0.0
Homepage https://github.com/fallenlonelie/Toast
License WTFPL
Platforms ios 8.0
Authors

TOAST

WTFPL

It’s a usable to very simply toast in swift.

features

  • Overlap to UI screen keyboard.
  • Easily show string or attributed string.
  • Easily set displaying duration and position.

CocoaPods

https://cocoapods.org/pods/FLToast

pod 'FLToast', '~> 1.0.0'

Add in ‘Podfile‘. and run pod install.

import FLToast

Add swift code in your project.

How To Use

Toast(text: "It's a SIMPLE Toast message.").show()

This is the most basic usage.

let attributedString = NSMutableAttributedString(string: "It's an Attributed Toast message.n", attributes: [.font: UIFont.systemFont(ofSize: 14.0), .foregroundColor: UIColor.red])

Toast(text: attributedString).show()

It’s show an attributed string.

Toast.makeText("It's a Top Toast message.").setGravity(.top).show()

or

Toast.makeText("It's a Middle Toast message.").setGravity(.middle).show()

or

Toast.makeText("It's a Top Bottom message.").setGravity(.bottom).show()

It can a specify the display position of message.

Toast.makeText("It's a Long (5s) Toast message.").setDuration(.long).show()

or

Toast.makeText("It's a Custom Duration (10s) Toast message.").setDuration(10.0).show()

It can specify the display duration of the message.

Latest podspec

{
    "name": "FLToast",
    "version": "1.0.0",
    "summary": "Use toast message in swift.",
    "swift_versions": "5.0",
    "description": "It's a usable to very simply toast in swift.",
    "homepage": "https://github.com/fallenlonelie/Toast",
    "license": "WTFPL",
    "authors": {
        "Lonelie": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/fallenlonelie/Toast.git",
        "tag": "1.0.0"
    },
    "source_files": "Toast/*.swift"
}

Pin It on Pinterest

Share This