TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2015 |
SPMSupports SPM | ✗ |
Maintained by Taiki Suzuki.
Show text with wave animated background and floating animation.
Add the SAWaveToast directory to your project.
If you install from cocoapods, You have to write import SAWaveToast
.
There are two initialize methods.
public convenience init(text: String, font: UIFont? = nil, fontColor: UIColor? = nil, waveColor: UIColor? = nil, duration: NSTimeInterval? = nil)
public init(attributedText: NSAttributedString, waveColor: UIColor? = nil, duration: NSTimeInterval? = nil)
It is simple to use SAWaveToast
like UIAlertController
.
let controller = SAWaveToast(text: "This is SAWaveToast!!")
presentViewController(controller, animated: false, completion: nil)
You can customize text.
let waveToast = SAWaveToast(text: "This is SAWaveToast!!", font: .systemFontOfSize(16), fontColor: .darkGrayColor() waveColor: .cyanColor(), duration: 5)
let attributes: [NSObject : AnyObject] = [
NSFontAttributeName : UIFont.systemFontOfSize(16),
NSForegroundColorAttributeName: UIColor.cyanColor()
]
let attributedText = NSAttributedString(string: "This is SAWaveToast!! ", attributes: attributes)
let waveToast = SAWaveToast(attributedText: attributedText, waveColor: .cyanColor(), duration: 5)
Taiki Suzuki, [email protected]
SAWaveToast is available under the MIT license. See the LICENSE file for more info.