{"id":15659453,"url":"https://github.com/f-meloni/easytoast","last_synced_at":"2025-05-05T19:29:42.355Z","repository":{"id":56909812,"uuid":"65209823","full_name":"f-meloni/EasyToast","owner":"f-meloni","description":"Swift Toasts Library","archived":false,"fork":false,"pushed_at":"2019-10-02T10:32:55.000Z","size":3003,"stargazers_count":21,"open_issues_count":2,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T22:39:45.769Z","etag":null,"topics":["android-like","ios","screenshot","swift","toast"],"latest_commit_sha":null,"homepage":"https://cocoapods.org/pods/EasyToast","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f-meloni.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-08T14:13:00.000Z","updated_at":"2022-04-05T05:14:36.000Z","dependencies_parsed_at":"2022-08-20T19:40:05.626Z","dependency_job_id":null,"html_url":"https://github.com/f-meloni/EasyToast","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-meloni%2FEasyToast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-meloni%2FEasyToast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-meloni%2FEasyToast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f-meloni%2FEasyToast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f-meloni","download_url":"https://codeload.github.com/f-meloni/EasyToast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252562563,"owners_count":21768311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-like","ios","screenshot","swift","toast"],"created_at":"2024-10-03T13:16:57.726Z","updated_at":"2025-05-05T19:29:42.317Z","avatar_url":"https://github.com/f-meloni.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyToast\n\n![Swift 5.0](https://img.shields.io/badge/Swift-5.0-blue.svg)\n[![Version](https://img.shields.io/cocoapods/v/EasyToast.svg?style=flat)](http://cocoapods.org/pods/EasyToast)\n[![License](https://img.shields.io/cocoapods/l/EasyToast.svg?style=flat)](http://cocoapods.org/pods/EasyToast)\n[![Platform](https://img.shields.io/cocoapods/p/EasyToast.svg?style=flat)](http://cocoapods.org/pods/EasyToast)\n\nAndroid-like toast with simple interface, using a toast queue to handle multiple toasts allowing to push or present a ViewController without disappear \n\n## Requirements\n- Swift: 4.x\n- iOS: 8+\n\n## Swift Version\nDepending on which version of Swift your project uses, you should use specific versions of EasyToast.\n\n|Swift version         |EasyToast version   |\n|:---------------------|:-------------------|\n|Swift 4.2 - 5.0       |`3.0.0` or later    |\n|Swift 3               |`2.0.x`             |\n|Swift 2.2             |`1.1.2`             |\n\n\n## Example Project\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\nEasyToast is available throgugh [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"EasyToast\"\n```\n\n## Show Toasts\n\n### Show default toasts\n\n```swift\nself.view.showToast(\"Toast Text\", position: .Bottom, popTime: 5, dismissOnTap: false)\nself.view.showToast(\"Toast Text\", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: true)\n```\n\n### Personalize toasts\n\n```swift\nself.view.showToast(\"Toast Text\", position: .Bottom, popTime: 5, dismissOnTap: false, bgColor: UIColor.blackColor(), textColor: UIColor.whiteColor(), font: UIFont.boldSystemFontOfSize(19))\nself.view.showToast(\"Toast Text\", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: true, bgColor: UIColor.redColor(), textColor: UIColor.blackColor(), font: UIFont.boldSystemFontOfSize(19))\n```\n\n### Personalize all toasts in view\n\n```swift\nself.view.toastBackgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.7)\nself.view.toastTextColor = UIColor.redColor()\nself.view.toastFont = UIFont.boldSystemFontOfSize(19)\n\nself.view.showToast(\"Toast Text\", position: .Bottom, popTime: 5, dismissOnTap: false)\nself.view.showToast(\"Toast Text\", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: true)\n```\n\n## Example\nOn button click will be executed this code\n\n```swift\nself.view.toastBackgroundColor = UIColor.blackColor().colorWithAlphaComponent(0.7)\nself.view.toastTextColor = UIColor.whiteColor()\nself.view.toastFont = UIFont.boldSystemFontOfSize(19)\n        \nself.view.showToast(\"Toast\", position: .Bottom, popTime: 2, dismissOnTap: false)\nself.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))\nself.view.showToast(\"Long Text Toast:\\n\" +\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.\",\n    position: .Bottom,\n    popTime: 5,\n    dismissOnTap: true,\n    bgColor: UIColor.redColor().colorWithAlphaComponent(0.7),\n    textColor: UIColor.whiteColor(),\n    font: UIFont.systemFontOfSize(19))\n```\n\n![EasyToast Gif Example](https://raw.github.com/f-meloni/EasyToast/master/GifExample/EasyToastExample.gif)\n\n## Configure Toasts\n\n```swift\nEasyToastConfiguration.toastInnerPadding = 10\nEasyToastConfiguration.animationDuration = 0.6\nEasyToastConfiguration.initialSpringVelocity = 0.07\nEasyToastConfiguration.dampingRatio = 0.65\n```\n\n## Toast tag\n\nTo 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\n\n#### Example\n\n```swift\nview.showToast(\"Toast\", tag:\"test\", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: false)\nview.showToast(\"Toast\", tag:\"test\", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: false)\nview.showToast(\"Toast\", tag:\"test\", position: .Bottom, popTime: kToastNoPopTime, dismissOnTap: false)\n```\n\nThis code will show only the first toast\n\n## Screenshots\n\n![EasyToast Screenshot](https://raw.github.com/f-meloni/EasyToast/master/Screenshots/EasyToastScreenshots.jpg)\n\n## Author\n\nFranco Meloni, franco.meloni91@gmail.com\n\n## License\n\nEasyToast is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff-meloni%2Feasytoast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff-meloni%2Feasytoast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff-meloni%2Feasytoast/lists"}