All Projects → f-meloni → EasyToast

f-meloni / EasyToast

Licence: MIT License
Swift Toasts Library

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to EasyToast

toast-swift
A Swift Toast view - iOS 14 style and newer - built with UIKit. 🍞
Stars: ✭ 85 (+325%)
Mutual labels:  toast
colorstorm
A color theme generator for editors and terminal emulators
Stars: ✭ 101 (+405%)
Mutual labels:  screenshot
awesome-www
Website of AwesomeWM
Stars: ✭ 39 (+95%)
Mutual labels:  screenshot
Desktopmagic
Robust multi-monitor screenshot grabbing library for Python 2.x/3.x on Windows
Stars: ✭ 52 (+160%)
Mutual labels:  screenshot
react-toast
Minimal toast notifications for React.
Stars: ✭ 47 (+135%)
Mutual labels:  toast
SteaScree
SteaScree: Steam Cloud Screenshot Uploader
Stars: ✭ 140 (+600%)
Mutual labels:  screenshot
web-companion
Browser extension to browse bookmarks and create notes in QOwnNotes
Stars: ✭ 53 (+165%)
Mutual labels:  screenshot
react-native-toastify
📱 React Native cross-plateform (iOS / Android) Toast component highly customizable.
Stars: ✭ 32 (+60%)
Mutual labels:  toast
nativescript-printer
📠 Send an image or the screen contents to a physical printer
Stars: ✭ 33 (+65%)
Mutual labels:  screenshot
JDToaster
🍞 Toasty iOS alerts
Stars: ✭ 25 (+25%)
Mutual labels:  toast
react-native-PixelsCatcher
👀 Library for UI snapshot testing of React Native
Stars: ✭ 99 (+395%)
Mutual labels:  screenshot
vrt-react
Take a screenshot 📸 of React component. Push it and compare images in pull request.
Stars: ✭ 19 (-5%)
Mutual labels:  screenshot
SingleFile-Lite
Feel the power of the Manifest V3. The future, right now!
Stars: ✭ 55 (+175%)
Mutual labels:  screenshot
iakit
无依赖 mini 组件库,只封装了 alert, toast, loading, actionSheet 等使用频率较高的组件。适用于类似 H5 活动页的简单移动端项目,不必为了使用这些组件而引入一个大而全的 UI 库和框架。
Stars: ✭ 38 (+90%)
Mutual labels:  toast
gpp-decrypt
Tool to parse the Group Policy Preferences XML file which extracts the username and decrypts the cpassword attribute.
Stars: ✭ 13 (-35%)
Mutual labels:  screenshot
ngx-toasta
Simple and clean Toast notification library for AngularX (Angular2 and beyond)
Stars: ✭ 20 (+0%)
Mutual labels:  toast
larafeed
Laravel package for providing visual feedback via screenshots.
Stars: ✭ 42 (+110%)
Mutual labels:  screenshot
php-flasher
🔔 Flasher is a powerful and flexible flash notifications system for PHP, Laravel, Symfony
Stars: ✭ 68 (+240%)
Mutual labels:  toast
screenshotgun
Open cross-platform screenshoter with cloud support and server part
Stars: ✭ 23 (+15%)
Mutual labels:  screenshot
godot-engine.code-snapshot
A plugin for Godot Engine which will let you take beautified snapshots of your code within the Editor. Configure the frame as you like, with GDScript syntax already highlighted.
Stars: ✭ 32 (+60%)
Mutual labels:  screenshot

EasyToast

Swift 5.0 Version License Platform

Android-like toast with simple interface, using a toast queue to handle multiple toasts allowing to push or present a ViewController without disappear

Requirements

  • Swift: 4.x
  • iOS: 8+

Swift Version

Depending on which version of Swift your project uses, you should use specific versions of EasyToast.

Swift version EasyToast version
Swift 4.2 - 5.0 3.0.0 or later
Swift 3 2.0.x
Swift 2.2 1.1.2

Example Project

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

Installation

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

pod "EasyToast"

Show Toasts

Show default toasts

self.view.showToast("Toast Text", position: .Bottom, popTime: 5, dismissOnTap: false)
self.view.showToast("Toast Text", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: true)

Personalize toasts

self.view.showToast("Toast Text", position: .Bottom, popTime: 5, dismissOnTap: false, bgColor: UIColor.blackColor(), textColor: UIColor.whiteColor(), font: UIFont.boldSystemFontOfSize(19))
self.view.showToast("Toast Text", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: true, bgColor: UIColor.redColor(), textColor: UIColor.blackColor(), font: UIFont.boldSystemFontOfSize(19))

Personalize all toasts in view

self.view.toastBackgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.7)
self.view.toastTextColor = UIColor.redColor()
self.view.toastFont = UIFont.boldSystemFontOfSize(19)

self.view.showToast("Toast Text", position: .Bottom, popTime: 5, dismissOnTap: false)
self.view.showToast("Toast Text", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: true)

Example

On button click will be executed this code

self.view.toastBackgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.7)
self.view.toastTextColor = UIColor.whiteColor()
self.view.toastFont = UIFont.boldSystemFontOfSize(19)
        
self.view.showToast("Toast", position: .Bottom, popTime: 2, dismissOnTap: false)
self.view.showToast("Dismiss on tap toast", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: true, bgColor: UIColor.redColor().colorWithAlphaComponent(0.7), textColor: UIColor.whiteColor(), font: UIFont.systemFontOfSize(19))
self.view.showToast("Long Text Toast:\n" +
    "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas vitae elit non leo pellentesque feugiat. Cras nec volutpat massa, nec blandit nisi. Etiam ut hendrerit purus. Morbi accumsan, risus ut cursus finibus, quam ipsum egestas nisl, vel hendrerit massa justo nec metus. Cras pulvinar, leo eu pulvinar convallis, tellus felis laoreet massa, ac tincidunt orci massa non odio. Ut pulvinar dictum metus quis mollis. Aenean tincidunt sit amet turpis sed egestas. Morbi porta dolor neque, ut pellentesque urna semper id. Cras rhoncus consequat justo. Cras dictum enim orci, ac vestibulum enim cursus id.",
    position: .Bottom,
    popTime: 5,
    dismissOnTap: true,
    bgColor: UIColor.redColor().colorWithAlphaComponent(0.7),
    textColor: UIColor.whiteColor(),
    font: UIFont.systemFontOfSize(19))

EasyToast Gif Example

Configure Toasts

EasyToastConfiguration.toastInnerPadding = 10
EasyToastConfiguration.animationDuration = 0.6
EasyToastConfiguration.initialSpringVelocity = 0.07
EasyToastConfiguration.dampingRatio = 0.65

Toast tag

To avoid multiple toasts with the same argument, e.g. if a user taps many times on the same button that shows a toast, you can tag it to prevent multiple toast displaying

Example

view.showToast("Toast", tag:"test", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: false)
view.showToast("Toast", tag:"test", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: false)
view.showToast("Toast", tag:"test", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: false)

This code will show only the first toast

Screenshots

EasyToast Screenshot

Author

Franco Meloni, [email protected]

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].