Skip to content

An easy to use alternative of Android snackbar for iOS.

License

Notifications You must be signed in to change notification settings

KI-labs/ki-snackbar

Repository files navigation

KISnackBar

This is an easy to use alternative of Android snackbar for iOS.

Demo

KISnackBar Demo

Installation

CocoaPods

For KISnackBar, use the following entry in your Podfile:

pod 'KISnackBar'

Then run pod install in your project directory.

Do not forget to import the framework with import KISnackBar in any file you'd like to use KISnackBar.

Carthage

For KISnackBar, use the following entry in your Cartfile:

github "KI-labs/ki-snackbar"

Run carthage update to build the framework and drag the built KISnackBar.framework into your Xcode project.

Do not forget to import the framework with import KISnackBar in any file you'd like to use KISnackBar.

Manually

Add KISnackBar.swift to your project 🎉.

Usage

KISnackBar.shared.show(title: "Transaction has been completed.", duration: .short)
KISnackBar.shared.show(title: "We need your permission.", buttonTitle: "Open Settings", 
			duration: .short) {			
    // Open Settings
}
KISnackBar.shared.show(backgroundColor: .black, title: "We need your permission.", titleColor: .white, 
			buttonTitle: "Open Settings", buttonTitleColor: .white, duration: .long) {
    // Open Settings
}

There is also an Example project in the repo which you can try KISnackBar

License

KISnackbar is released under an MIT license. See LICENSE for more information.