Functional SnackBar that responds to the keyboard and shows a message at the bottom of the screen.
File > Add Packages > https://github.com/donggyushin/DGSnackBar
pod 'DGSnackBar', :git => 'https://github.com/donggyushin/DGSnackBar.git'
DGSnackBar.shared.showToast("Hi") {
print("Add here a function that you want to execute when user tapped the snackbar view")
}
// If you want to show SnackBar with title message
DGSnackBar.shared.showToast("Description text", "Title text")
Properties | Description | Default | Type |
---|---|---|---|
backgroundColor | Snackbar's background color | .black | UIColor |
textColor | Snackbar's text color | .white | UIColor |
duration | Snackbar's visual duration time | 2.5 | CGFloat |
textAlignment | Snackbar's description text alignement | .natural | NSTextAlignment |
titleTextAlignment | Snackbar's title text alignment | .natural | NSTextAlignment |
alpha | Snackbar's alpha | 0.8 | CGFloat |
cornerRadius | Snackbar's border radius | 10 | CGFloat |
link |
Stars: 10 |
Last commit: 2 years ago |
Full Changelog: https://github.com/donggyushin/DGSnackBar/compare/v1.0.4...v1.0.5
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics