Latest 1.0.0
Homepage https://github.com/k-lpmg/AwaitToast
License MIT
Platforms ios 9.0
Authors

Cocoapods
Carthage compatible
Swift
GitHub license

🍞 Basic toast as well as async waiting toast.
Inspired by facebook posting toast.

Introduction

AwaitToastAwaitToast

Usage

Default

let toast: Toast = Toast.default(text: "Toast is started")

// Show
toast.show()

// Dismiss
toast.dismiss()

// Bottom Direction
Toast.default(text: "Toast is started", direction: .bottom)

Await

let awaitToast: AwaitToast = AwaitToast.default(initialText: "Toast is started", endText: "Toast is ended")

// Show
awaitToast.show()

// Finish
awaitToast.finish()

// Dismiss
awaitToast.dismiss()

Dismiss

// Last toast in queue dismiss
Toast.latestDismiss()
AwaitToast.latestDismiss()

// All toast in queue dismiss
Toast.dismissAll()
AwaitToast.dismissAll()

Appearance

// Get singleton appearance object
let defaultAppearance = ToastAppearanceManager.default
let iconAppearance = ToastAppearanceManager.icon

// Update singletone appearance properties
defaultAppearance.height = 128
defaultAppearance.backgroundColor = .white
defaultAppearance.numberOfLines = 1
defaultAppearance.textAlignment = .left
...

Behavior

// Get singleton behavior object
let defaultBehavior = ToastBehaviorManager.default
let iconBehavior = ToastBehaviorManager.icon

// Update singletone behavior properties
defaultBehavior.isTappedDismissEnabled = false
defaultBehavior.delay = 3.0
defaultBehavior.showDurarion = 0.3
defaultBehavior.duration = 3.0
defaultBehavior.dismissDuration = 0.3
...

Installation

CocoaPods (iOS 9+)

platform :ios, '9.0'
use_frameworks!

target 'MyApp' do
    pod 'AwaitToast'
end

Carthage (iOS 9+)

github "k-lpmg/AwaitToast"

LICENSE

These works are available under the MIT license. See the LICENSE file
for more info.

Latest podspec

{
    "name": "AwaitToast",
    "version": "1.0.0",
    "summary": "ud83cudf5e Basic toast as well as async waiting toast.",
    "homepage": "https://github.com/k-lpmg/AwaitToast",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "DongHee Kang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/k-lpmg/AwaitToast.git",
        "tag": "1.0.0"
    },
    "documentation_url": "https://github.com/k-lpmg/AwaitToast/blob/master/README.md",
    "ios": {
        "source_files": "Sources/**/*.swift"
    },
    "platforms": {
        "ios": "9.0"
    }
}

Pin It on Pinterest

Share This