{"id":2428,"url":"https://github.com/scalessec/Toast-Swift","last_synced_at":"2025-08-02T23:33:35.454Z","repository":{"id":38395895,"uuid":"45354396","full_name":"scalessec/Toast-Swift","owner":"scalessec","description":"A Swift extension that adds toast notifications to the UIView object class.","archived":false,"fork":false,"pushed_at":"2024-04-09T13:33:08.000Z","size":644,"stargazers_count":3681,"open_issues_count":7,"forks_count":571,"subscribers_count":52,"default_branch":"master","last_synced_at":"2024-12-04T15:06:08.776Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/scalessec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-01T19:33:32.000Z","updated_at":"2024-12-01T14:34:52.000Z","dependencies_parsed_at":"2024-04-09T14:54:12.101Z","dependency_job_id":null,"html_url":"https://github.com/scalessec/Toast-Swift","commit_stats":{"total_commits":230,"total_committers":24,"mean_commits":9.583333333333334,"dds":0.508695652173913,"last_synced_commit":"d780ff8fe55659b4fddf1fbfaf930d967f35d9ea"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalessec%2FToast-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalessec%2FToast-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalessec%2FToast-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalessec%2FToast-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalessec","download_url":"https://codeload.github.com/scalessec/Toast-Swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228389191,"owners_count":17912188,"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":[],"created_at":"2024-01-05T20:16:13.522Z","updated_at":"2024-12-06T17:31:06.371Z","avatar_url":"https://github.com/scalessec.png","language":"Swift","funding_links":[],"categories":["UI","Swift","OOM-Leaks-Crash"],"sub_categories":["Alert \u0026 Action Sheet","Other free courses","Toast"],"readme":"Toast-Swift\n=============\n\n[![CocoaPods Version](https://img.shields.io/cocoapods/v/Toast-Swift.svg)](http://cocoadocs.org/docsets/Toast-Swift)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\nToast-Swift is a Swift extension that adds toast notifications to the `UIView` object class. It is intended to be simple, lightweight, and easy to use. Most toast notifications can be triggered with a single line of code.\n\n**Toast-Swift is a native Swift port of [Toast for iOS](https://github.com/scalessec/Toast \"Toast for iOS\").**\n\nScreenshots\n---------\n![Toast-Swift Screenshots](toast_swift_screenshot.jpg)\n\n\nBasic Examples\n---------\n```swift\n// basic usage\nself.view.makeToast(\"This is a piece of toast\")\n\n// toast with a specific duration and position\nself.view.makeToast(\"This is a piece of toast\", duration: 3.0, position: .top)\n\n// toast presented with multiple options and with a completion closure\nself.view.makeToast(\"This is a piece of toast\", duration: 2.0, point: CGPoint(x: 110.0, y: 110.0), title: \"Toast Title\", image: UIImage(named: \"toast.png\")) { didTap in\n    if didTap {\n        print(\"completion from tap\")\n    } else {\n        print(\"completion without tap\")\n    }\n}\n\n// display toast with an activity spinner\nself.view.makeToastActivity(.center)\n\n// display any view as toast\nself.view.showToast(myView)\n\n// immediately hides all toast views in self.view\nself.view.hideAllToasts()\n```\n\nBut wait, there's more!\n---------\n```swift\n// create a new style\nvar style = ToastStyle()\n\n// this is just one of many style options\nstyle.messageColor = .blue\n\n// present the toast with the new style\nself.view.makeToast(\"This is a piece of toast\", duration: 3.0, position: .bottom, style: style)\n\n// or perhaps you want to use this style for all toasts going forward?\n// just set the shared style and there's no need to provide the style again\nToastManager.shared.style = style\nself.view.makeToast(\"This is a piece of toast\") // now uses the shared style\n\n// toggle \"tap to dismiss\" functionality\nToastManager.shared.isTapToDismissEnabled = true\n\n// toggle queueing behavior\nToastManager.shared.isQueueEnabled = true\n```\n\nSee the demo project for more examples.\n\n\nSetup Instructions\n------------------\n\n[CocoaPods](http://cocoapods.org)\n------------------\n\nTo integrate Toast-Swift into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\npod 'Toast-Swift', '~\u003e 5.1.1'\n```\n\nand in your code add `import Toast_Swift`.\n\n[Carthage](https://github.com/Carthage/Carthage)\n------------------\n\nTo integrate Toast-Swift into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"scalessec/Toast-Swift\" ~\u003e 5.1.1\n```\n\nRun `carthage update` to build the framework and drag the built `ToastSwiftFramework.framework` into your Xcode project.\n\nand in your code add `import ToastSwiftFramework`.\n\n[Swift Package Manager](https://swift.org/package-manager/)\n------------------\n\nWhen using Xcode 11 or later, you can install `Toast` by going to your Project settings \u003e `Swift Packages` and add the repository by providing the GitHub URL. Alternatively, you can go to `File` \u003e `Swift Packages` \u003e `Add Package Dependencies...`\n\nManually\n------------------\n\n1. Add `Toast.swift` to your project.\n2. Grab yourself a cold 🍺.\n\nCompatibility\n------------------\n* Version `5.x.x` requires Swift 5 and Xcode 10.2 or later.\n* Version `4.x.x` requires Swift 4.2 and Xcode 10.\n* Version `3.x.x` requires Swift 4 and Xcode 9.\n* Version `2.x.x` requires Swift 3 and Xcode 8.\n* Version `1.4.x` requires Swift 2.2 and Xcode 7.3. \n* Version `1.0.0` can be used with Swift 2.1 and earlier versions of Xcode.\n\nPrivacy\n-----------\nToast-Swift does not collect any data. A [privacy manifest](Toast/Resources/PrivacyInfo.xcprivacy) is provided with the library. See [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files) for related details.\n \nMIT License\n-----------\n    Copyright (c) 2015-2024 Charles Scalesse.\n\n    Permission is hereby granted, free of charge, to any person obtaining a\n    copy of this software and associated documentation files (the\n    \"Software\"), to deal in the Software without restriction, including\n    without limitation the rights to use, copy, modify, merge, publish,\n    distribute, sublicense, and/or sell copies of the Software, and to\n    permit persons to whom the Software is furnished to do so, subject to\n    the following conditions:\n\n    The above copyright notice and this permission notice shall be included\n    in all copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalessec%2FToast-Swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalessec%2FToast-Swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalessec%2FToast-Swift/lists"}