Provides Android-like API for displaying toasts with keyboard aware positioning on iOS.
Through CocoaPods:
pod 'SimpleToast', '~> 0.1.1'
First you need to initialize the keyboard observer somewhere. It doesn't really matter where.
import SimpleToast
...
Toast.initKeyboardObserver()
...
Then use just use it as follows (with the library imported):
Toast.makeText("My toast message", Toast.LENGTH_LONG).show()
There's a few appearance settings you can adjust:
Right there's no background at all if you turn this of. To be fixed...
Margin to parent view (ie. the window)
Padding between the background view and the text label.
Set the values like so:
Toast.appearance.cornerRadius = 2