Latest0.2.0
Homepagehttps://github.com/szk-atmosphere/SAWaveToast
LicenseMIT
Platformsios 8.0, requires ARC
Authors

Platform
Language
Version
License

SAWaveToast

Show text with wave animated background and floating animation.

Features

  • [x] Wave aniamtion toast
  • [x] Support NSAttributedString
  • [ ] Culculate wave aniamtion wit gyro

Installation

CocoaPods

SAWaveToast is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "SAWaveToast"

Manually

Add the SAWaveToast directory to your project.

Usage

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)

Customize

You can customize text.

String

let waveToast = SAWaveToast(text: "This is SAWaveToast!!", font: .systemFontOfSize(16), fontColor: .darkGrayColor() waveColor: .cyanColor(), duration: 5)

NSAttributedString

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)

Requirements

  • Xcode 6.4 or greater
  • iOS7.0(manually only) or greater

Author

Taiki Suzuki, [email protected]

License

SAWaveToast is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SAWaveToast",
    "version": "0.2.0",
    "summary": "Show text with wave animated background and floating animation.",
    "homepage": "https://github.com/szk-atmosphere/SAWaveToast",
    "license": "MIT",
    "authors": {
        "Taiki Suzuki": "[email protected]"
    },
    "source": {
        "git": "https://github.com/szk-atmosphere/SAWaveToast.git",
        "tag": "0.2.0"
    },
    "social_media_url": "https://twitter.com/SzkAtmosphere",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "SAWaveToast/*.{swift}"
}

Pin It on Pinterest

Share This