{"id":15033541,"url":"https://github.com/devxoul/toaster","last_synced_at":"2025-05-14T18:05:22.618Z","repository":{"id":6708544,"uuid":"7954105","full_name":"devxoul/Toaster","owner":"devxoul","description":"🍞 Toast for Swift","archived":false,"fork":false,"pushed_at":"2024-09-03T11:45:37.000Z","size":769,"stargazers_count":1822,"open_issues_count":23,"forks_count":267,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-05-14T18:05:16.270Z","etag":null,"topics":["ios","swift","toast"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devxoul.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":"Supporting Files/Info.plist","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-01T07:58:22.000Z","updated_at":"2025-05-12T15:59:08.000Z","dependencies_parsed_at":"2024-11-19T12:11:32.481Z","dependency_job_id":"e7ca48a5-7193-471e-9c66-8f9882950789","html_url":"https://github.com/devxoul/Toaster","commit_stats":{"total_commits":228,"total_committers":28,"mean_commits":8.142857142857142,"dds":0.4342105263157895,"last_synced_commit":"a5aacb802cc6c243c3283899529a11f7b0f2ab53"},"previous_names":["devxoul/jltoast"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FToaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FToaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FToaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devxoul%2FToaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devxoul","download_url":"https://codeload.github.com/devxoul/Toaster/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"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":["ios","swift","toast"],"created_at":"2024-09-24T20:21:37.770Z","updated_at":"2025-05-14T18:05:17.604Z","avatar_url":"https://github.com/devxoul.png","language":"Swift","readme":"Toaster\n=======\n\n[![Build Status](https://travis-ci.org/devxoul/Toaster.svg?branch=master)](https://travis-ci.org/devxoul/Toaster)\n![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![CocoaPods](https://img.shields.io/cocoapods/v/Toaster.svg?style=flat)](https://cocoapods.org/?q=name%3AToaster%20author%3Adevxoul)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\nAndroid-like toast with very simple interface. (formerly JLToast)\n\n\nScreenshots\n-----------\n\n![Toaster Screenshot](https://raw.github.com/devxoul/Toaster/master/Screenshots/Toaster.png)\n\n\nFeatures\n--------\n\n- **Queueing**: Centralized toast center manages the toast queue.\n- **Customizable**: See the [Appearance](#appearance) section.\n- **String** or **AttributedString**: Both supported.\n- **UIAccessibility**: VoiceOver support.\n\n\nAt a Glance\n-----------\n\n```swift\nimport Toaster\n\nToast(text: \"Hello, world!\").show()\n```\n\n\nCompatibility\n-------------\n\nToaster supports the same minimum Xcode version as App Store submission (https://developer.apple.com/ios/submit/):\n- Xcode 15 and newer\n\nToaster supports the same Swift versions as Xcode (https://developer.apple.com/support/xcode/):\n- Swift 4 and newer\n\nToaster supports all Apple platforms.\n\n\nInstallation\n------------\n\n- **For projects with [CocoaPods](https://cocoapods.org):**\n\n    ```ruby\n    pod 'Toaster'\n    ```\n\n- **For projects with [Carthage](https://github.com/Carthage/Carthage):**\n\n    ```\n    github \"devxoul/Toaster\"\n    ```\n\n- **For projects with [Swift Package Manager](https://github.com/apple/swift-package-manager):**\n\n    ```\n    dependencies: [\n        .package(url: \"https://github.com/devxoul/Toaster.git\", from: \"master\")\n    ]\n    ```\n\n\nGetting Started\n---------------\n\n### Setting Duration and Delay\n\n```swift\nToast(text: \"Hello, world!\", duration: Delay.long)\nToast(text: \"Hello, world!\", delay: Delay.short, duration: Delay.long)\n```\n\n### Removing Toasts\n\n- **Removing toast with reference**:\n\n    ```swift\n    let toast = Toast(text: \"Hello\")\n    toast.show()\n    toast.cancel() // remove toast immediately\n    ```\n\n- **Removing current toast**:\n\n    ```swift\n    if let currentToast = ToastCenter.default.currentToast {\n        currentToast.cancel()\n    }\n    ```\n\n- **Removing all toasts**:\n\n    ```swift\n    ToastCenter.default.cancelAll()\n    ```\n\n### Appearance\n\nSince Toaster 2.0.0, you can use `UIAppearance` to set default appearance. This is an short example to set default background color to red.\n\n```swift\nToastView.appearance().backgroundColor = .red\n```\n\nSupported appearance properties are:\n\n| Property | Type | Description |\n|---|---|---|\n| `backgroundColor` | `UIColor` | Background color |\n| `cornerRadius` | `CGFloat` | Corner radius |\n| `textInsets` | `UIEdgeInsets` | Text inset |\n| `textColor` | `UIColor` | Text color |\n| `font` | `UIFont` | Font |\n| `bottomOffsetPortrait` | `CGFloat` | Vertical offfset from bottom in portrait mode |\n| `bottomOffsetLandscape` | `CGFloat` | Vertical offfset from bottom in landscape mode |\n| `shadowPath` | `CGPath` | The shape of the layer’s shadow |\n| `shadowColor` | `UIColor` | The color of the layer’s shadow |\n| `shadowOpacity` | `Float` | The opacity of the layer’s shadow |\n| `shadowOffset` | `CGSize` | The offset (in points) of the layer’s shadow |\n| `shadowRadius` | `CGFloat` | The blur radius (in points) used to render the layer’s shadow |\n| `maxWidthRatio` | `CGFloat` | The width ratio of toast view in window |\n| `useSafeAreaForBottomOffset` | `Bool` | A Boolean value that determines `safeAreaInsets.bottom` is added to `bottomOffset` |\n\n### Attributed string\n\nSince Toaster 2.3.0, you can also set an attributed string:\n\n```swift\nToast(attributedText: NSAttributedString(string: \"AttributedString Toast\", attributes: [NSAttributedString.Key.backgroundColor: UIColor.yellow]))\n```\n\n### Accessibility\n\nBy default, VoiceOver with UIAccessibility is enabled since Toaster 2.3.0. To disable it:\n```swift\nToastCenter.default.isSupportAccessibility = false\n```\n\n\nLicense\n-------\n\nToaster is under [WTFPL](http://www.wtfpl.net/). You can do what the fuck you want with Toast. See [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Ftoaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevxoul%2Ftoaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevxoul%2Ftoaster/lists"}