- Flexible, easy to use and customizable.
- Snacks are stackable and swipeable.
- Snacks are actionable.
- Supports iOS 11.0 +
- Written with the latest Swift (Swift 5)
-
Install CocoaPods.
-
Add this pod to your
Podfile
.target 'Example' do use_frameworks! pod 'LPSnackbar' end
-
Run
pod install
. -
Open up the
.xcworkspace
that CocoaPods created. -
Import
LPSnackbar
into any source file where it's needed.
- Simply download the source from here and add it to your Xcode project.
Snacks can be simple
// Yes, this simple.
let snackbar = LPSnackbarManager.createSnackBar(title: "I'm a snack!")
snackbar.viewToDisplayIn = view
LPSnackbarManager.show(snackBar: snackbar)
Snacks can be customized
let snackbar = LPSnackbarManager.createSnackBar(title: text, buttonTitle: "Undo", delegate: self)
snackbar.viewToDisplayIn = view
snackbar.bottomSpacing = (tabBarController?.tabBar.frame.height ?? 0) + 12
snackbar.adjustsPositionForSafeArea = false
LPSnackbarManager.show(snackBar: snackbar)
Download and run the example project
Full documentation available here