SmartToast 0.1.4

SmartToast 0.1.4

Maintained by Aamir.



iToast

CI Status Version License Platform

Example

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

Requirements

Features

  • Queueing: Centralized toast center manages the toast queue.
  • Customizable: See the Appearance section.
  • Positionable: Set the toast position to center, top or bottom

Usage


import SmartToast

// basic usage
ToastManager.shared.showToast("Hello world")

// toast with a specific duration and position
ToastManager.shared.showToast("Hello world", duration: ToastManager.LENGHT_LONG, position: .top)

// toast with customized appearance
var style = ToastStyle()
style.backgroundColor = UIColor.red.withAlphaComponent(0.8)
ToastManager.shared.showToast("Hello world", style:style)

Installation

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

pod 'SmartToast'

Appearance

Supported appearance properties are:

Property Type Description
backgroundColor UIColor Background color of toast
cornerRadius CGFloat Corner radius
shadowOpacity Float Toast shadow opacity
shadowColor UIColor Shadow color
shadowOffset CGSize Shadow offset
shadowRadius CGFloat Shadow radius
textColor UIColor Toast message color

Demo

Screenshot

Author

Aamir, [email protected]

License

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