Latest 0.1-alpha
Homepage https://github.com/chaoyang805/CYSnackbar
License Apache License, Version 2.0
Platforms ios 8.0
Frameworks UIKit
Authors

Description

Snackbar on iOS, written by Swift 3.

demo

Usage

CYSnackbar.make(text: "This is a snackbar", duration: .short).show() // Show a short snackbar
// Show a snackbar with button
CYSnackbar
    .make(text: "This is a snackbar", duration: .short)
    .action(with: "OK", action: { (sender) in        
        NSLog("snackbar clicked")
    })
    .show()
// Dismiss Handler get called when the snackbar is automatically dismissed.
CYSnackbar
    .make(text: "this is a snackbar", duration: .long)
    .action(with: "OK", action: { (sender) in
        NSLog("snackbar clicked")
    })
    .dismissHandler {
        NSLog("snackbar dismissed")
    }
    .show()

Install

  • Install from Cocoa pods

    Add this line to your Podfile: pod 'CYSnackbar', '0.1-alpha', don’t forget to add use_frameworks!

    Your Podfile would look like this:

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'TargetName' do
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!
    
    # Pods for Touches
    pod 'CYSnackbar', '~> 0.1-alpha'
    end

    ‚Äč

  • Or just clone this repository, add source file to your project.

    git clone https://github.com/chaoyang805/CYSnackbar.git

Latest podspec

{
    "name": "CYSnackbar",
    "version": "0.1-alpha",
    "summary": "Snackbar for iOS.",
    "homepage": "https://github.com/chaoyang805/CYSnackbar",
    "license": "Apache License, Version 2.0",
    "authors": {
        "chaoyang805": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/chaoyang805/CYSnackbar.git",
        "tag": "v0.1-alpha"
    },
    "source_files": [
        "CYSnackbar",
        "CYSnackbar/**/*.{h,m,swift}"
    ],
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This