Giter VIP home page Giter VIP logo

motiontoastview's Introduction

MotionToastView - A Beautiful Toast Library for iOS Swift

CI Status Version License Platform

A Beautiful Multipurpose Motion Toast Library in iOS using Swift ๐Ÿ˜

GitHub Cards Preview

Preview - Vibrant Toast ๐ŸŒˆ

gif

Preview - Pale Toast ๐ŸŒŸ

gif

Preview - Dark Vibrant Toast ๐ŸŒˆ

gif

Preview - Dark Pale Toast ๐ŸŒˆ

gif

Types of Toast Style โค๏ธ

1. Pale Toast 2. Vibrant Toast 3. Dark Pale Toast 4. Dark Vibrant Toast

About

A Beautiful Multipurpose Motion Toast View in iOS using Swift with full customisation options. The library is developed using Swift 5.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

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

pod 'MotionToastView'

Import MotionToastView in your class

import MotionToastView

4๏ธโƒฃ Toast types

        1 .success
        2 .error
        3 .warning
        4 .info

โœŒ๐Ÿป Toast styles

        1 .style_vibrant
        2 .style_pale

โŒ›๏ธ Toast duration

        1 .short 	// 2 Seconds
        2 .long 	// 4 Seconds

Usage

Sample Code for - Motion Toast View ๐ŸŒŸ

Success Toast

(Basic)

MotionToast(message: "You have successfully completed the trip", toastType: .success)             

Error Toast

(with corner radius)

MotionToast(message: "You have failed to complete the trip", toastType: .error, toastCornerRadius: 12)

Warning Toast

(with duration, style, gravity, pulseEffect)

MotionToast(message: "You are not in the location. Try again", toastType: .warning, duration: .long, 
              toastStyle: .style_pale, toastGravity: .centre, pulseEffect: false)     

Info Toast

(with duration, style, gravity)

MotionToast(message: "You have failed to complete the trip", toastType: .info, 
              duration: .long, toastStyle: .style_pale, toastGravity: .top)

Note:

Light and Dark mode are set using system preference

toastCornerRadius parameter is only for toast style - vibrant

Motion Toast View

Parameter Optional Default Value Type Values Available
message false nil String custom
toastType false nil enum [.success, .error, .warning, .info]
duration true .short enum [.short, .long]
toastStyle true .style_vibrant enum [.style_vibrant, .style_pale]
toastGravity true .bottom enum [.top, .centre, .bottom]
toastCornerRadius true 0 Int custom
pulseEffect true true Bool [true, false]

โœ๐Ÿป Want More Customisation?

MotionToast_Customisation(header: "Custom Toast", message: "It gives you more customisation options.",
                            headerColor: UIColor(red: 255.0, green: 255.0, blue: 255.0, alpha: 1.0), 
                            messageColor: UIColor(red: 239.0, green: 239.0, blue: 239.0, alpha: 0.7), 
                            primary_color: UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 0.5), 
                            secondary_color: UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0), 
                            icon_image: UIImage(named: "apple")!, duration: .long, toastStyle: .style_pale, 
                            toastGravity: .bottom, toastCornerRadius: 12, pulseEffect: true)

Checkout Android version of this library Motion Toast

Design Inspired from @Spikeysanju

Donation

If this project helped you reduce time to develop, you can buy me a cup of coffee :)

Buy Me A Coffee

Author

Sameer Nawaz, [email protected]

License

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

motiontoastview's People

Contributors

sameersyd 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  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  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

motiontoastview'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.