This is an easy to use alternative of Android snackbar for iOS.
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.
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.
Add KISnackBar.swift to your project 🎉.
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
KISnackbar is released under an MIT license. See LICENSE for more information.