TinyToast is simple toast library in Swift.
- Swift 5.2
- iOS 9.0 or later
github "keygx/TinyToast"
pod 'TinyToast', :git => 'https://github.com/keygx/TinyToast'
- Swift 5.2, tag "swift5.2"
- Swift 5.1, tag "swift5.1"
- Swift 5, tag "swift5"
- Swift 4.2, tag "swift4.2"
- Swift 4.1, tag "swift4.1"
- Swift 4.0, tag "swift4.0"
it will be automatically dismiss at the set time
/* VAlign: .top / .center / .bottom */
/* Duration: .short (2.0) / .normal (3.5) / .long (5.0) / .longLong (8.0) / User setting */
TinyToast.shared.show(message: "Message you want to display", valign: .center, duration: .normal)
TinyToast.shared.show(message: "Message you want to display", valign: .center, duration: 15.0) // 15sec.
If you want to manually dismiss the first toast
TinyToast.shared.dismiss()
If you want to manually dismiss all toast
TinyToast.shared.dismissAll()
- Support to iOS13 and Dark Mode
Light | Dark |
---|---|
.top | .top |
.center | .center |
.bottom | .bottom |
Light |
---|
.top |
.center |
.bottom |
Dark |
---|
.top |
.center |
.bottom |
TinyToast is released under the MIT license. See LICENSE for details.
Yukihiko Kagiyama (keygx) https://twitter.com/keygx