CRToastSwift 1.0.0-alpha.2

CRToastSwift 1.0.0-alpha.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2016
SPMSupports SPM

Maintained by Masahiko Tsujita.



CRToastSwift 1.0.0-alpha.2

  • By
  • Masahiko Tsujita

CRToastSwift

This is a wrapper library of CRToast. Interfaces are redesigned to be used easily with Swift.
Attributes gets type-safe and more simply writable. And you no londer need to use Singleton.
Create NotificationController instance, configure attirubutes and then call present() to show a notification.

Usage

// Instantiate a notification controller
let notification = CRToastSwift.NotificationController(
    title: "Hello!",
    subtitle: "This is a subtitle text."
    template: .Info)

// Configure notification attributes
notification.titleTextAlignment = .Center
notification.inAnimationType = .Gravity
notification.outAnimationType = .Gravity
notification.duration = 3.0

// Show a notification
notification.present()

Installation

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

pod "CRToastSwift"

License

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