Latest 1.1.2
Homepage https://github.com/luispadron/LPSnackbar
License MIT
Platforms ios 8.0
Authors

LPSnackbar

Features

  • Flexible, easy to use and customizable.
  • Snacks are actionable.

  • Snacks are stackable and swipeable.

  • Supports iOS 8.0 +
  • Written with the latest Swift (Swift 4)

Installation

Cocoapods (recommended)

  1. Install CocoaPods.
  2. Add this pod to your Podfile.

    target 'Example' do
      use_frameworks!
    
      pod 'LPSnackbar'
    end
  3. Run pod install.
  4. Open up the .xcworkspace that CocoaPods created.
  5. Import LPSnackbar into any source file where it’s needed.

From Source

  1. Simply download the source from here and add it to your Xcode project.

Usage

Snacks can be simple

// Yes, this simple.
LPSnackbar.showSnack(title: "I'm a snack!")

Snacks can be customized

let snack = LPSnackbar(title: "Object deleted.", buttonTitle: "UNDO")
// Customize the snack
snack.bottomSpacing = (tabBarController?.tabBar.frame.height ?? 0) + 15
snack.view.titleLabel.font = UIFont.systemFont(ofSize: 20)

// Show a snack to allow user to undo deletion
snack.show(animated: true) { (undone) in
    if undone {
        // Undo deletion
    } else {
        // Follow through with deletion
    }
}

Example

Download and run the example project

Documentation

Full documentation available here

Latest podspec

{
    "name": "LPSnackbar",
    "version": "1.1.2",
    "summary": "A flexible and easy to use Snackbar control for iOS.",
    "description": "Flexible and customizable Android inspired Snackbar control for iOS devices.",
    "homepage": "https://github.com/luispadron/LPSnackbar",
    "screenshots": "https://raw.githubusercontent.com/luispadron/LPSnackbar/master/.github/Screen1.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Luis Padron": "luispadronn@gmail.com"
    },
    "social_media_url": "http://luispadron.com",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/luispadron/LPSnackbar.git",
        "tag": "v1.1.2"
    },
    "source_files": [
        "LPSnackbar",
        "LPSnackbar/**/*.{h,m}"
    ],
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This