https://github.com/ki-labs/ki-snackbar
An easy to use alternative of Android snackbar for iOS.
https://github.com/ki-labs/ki-snackbar
ios12 iphone-x snackbar swift swift4 ui-components
Last synced: 6 months ago
JSON representation
An easy to use alternative of Android snackbar for iOS.
- Host: GitHub
- URL: https://github.com/ki-labs/ki-snackbar
- Owner: KI-labs
- License: mit
- Created: 2018-08-30T08:48:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T14:17:12.000Z (almost 7 years ago)
- Last Synced: 2025-04-13T14:08:27.204Z (6 months ago)
- Topics: ios12, iphone-x, snackbar, swift, swift4, ui-components
- Language: Swift
- Homepage:
- Size: 84 KB
- Stars: 12
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KISnackBar
This is an easy to use alternative of Android snackbar for iOS.## Demo
## Installation
### CocoaPods
For *KISnackBar*, use the following entry in your **Podfile**:
```rb
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
```swift
KISnackBar.shared.show(title: "Transaction has been completed.", duration: .short)
``````swift
KISnackBar.shared.show(title: "We need your permission.", buttonTitle: "Open Settings",
duration: .short) {
// Open Settings
}
``````swift
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](https://github.com/KI-labs/ki-snackbar-dev/blob/master/LICENSE) for more information.