GithubHelp home page GithubHelp logo

marty-suzuki / sawavetoast Goto Github PK

View Code? Open in Web Editor NEW
34.0 6.0 7.0 703 KB

Show text with wave animated background and floating animation.

License: MIT License

Ruby 4.39% Swift 65.93% Objective-C 2.11% C 1.72% Shell 25.86%

sawavetoast's Introduction

SAWaveToast

Platform Language Version License

Show text with wave animated background and floating animation.

Features

  • Wave aniamtion toast
  • 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.

sawavetoast's People

Contributors

ca-atmosphere avatar marty-suzuki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sawavetoast's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.