{"id":2436,"url":"https://github.com/evgenyneu/Dodo","last_synced_at":"2025-08-06T15:30:32.597Z","repository":{"id":33255696,"uuid":"36900099","full_name":"evgenyneu/Dodo","owner":"evgenyneu","description":"A message bar for iOS written in Swift.","archived":false,"fork":false,"pushed_at":"2022-01-09T22:06:45.000Z","size":2764,"stargazers_count":874,"open_issues_count":0,"forks_count":61,"subscribers_count":31,"default_branch":"master","last_synced_at":"2024-05-21T02:31:30.669Z","etag":null,"topics":["ios","message","swift"],"latest_commit_sha":null,"homepage":"","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/evgenyneu.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":"2015-06-04T22:59:17.000Z","updated_at":"2024-04-21T00:03:03.000Z","dependencies_parsed_at":"2022-07-13T10:20:28.474Z","dependency_job_id":null,"html_url":"https://github.com/evgenyneu/Dodo","commit_stats":null,"previous_names":["marketplacer/dodo"],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgenyneu%2FDodo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgenyneu%2FDodo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgenyneu%2FDodo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evgenyneu%2FDodo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evgenyneu","download_url":"https://codeload.github.com/evgenyneu/Dodo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228915461,"owners_count":17991409,"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","message","swift"],"created_at":"2024-01-05T20:16:13.735Z","updated_at":"2024-12-09T15:30:51.221Z","avatar_url":"https://github.com/evgenyneu.png","language":"Swift","funding_links":[],"categories":["UI","Libs","Swift","UI [🔝](#readme)","Content"],"sub_categories":["Alert \u0026 Action Sheet","UI","Other free courses","Alert"],"readme":"# Dodo, a message bar for iOS / Swift\n\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CocoaPods Version](https://img.shields.io/cocoapods/v/Dodo.svg?style=flat)](http://cocoadocs.org/docsets/Dodo)\n[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)\n[![License](https://img.shields.io/cocoapods/l/Dodo.svg?style=flat)](LICENSE)\n[![Platform](https://img.shields.io/cocoapods/p/Dodo.svg?style=flat)](http://cocoadocs.org/docsets/Dodo)\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/buttons/dodo_a_message_bar_for_ios_written_in_swift.jpg' alt='Dodo, a message bar for iOS' width='414'\u003e\n\nThis is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, something like: \"Message sent\", \"Note saved\", \"No Internet connection\".\n\n* Dodo includes styles for success, info, warning and error type messages.\n* The bar can have buttons with custom tap handlers.\n* Bar styles can be customized.\n* You can provide custom animations for showing and hiding the bar or use one of the default animation presets.\n* Supports iOS 9+.\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/Paintings/alices_adventures_in_wonderland.png'\nwidth='300' alt=\"Illustration fromAlice's Adventures in Wonderland by John Tenniel\" \u003e\n\n\n\u003e At last the Dodo said, `EVERYBODY has won, and all must have prizes.'\n\n*From Alice's Adventures in Wonderland. Original illustration by John Tenniel, 1865. Source: [Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Alice_par_John_Tenniel_09.png).*\n\n\n## Setup\n\nThere are multiple ways you can add Dodo to your project.\n\n**Add source**\n\nSimply add [DodoDistrib.swift](https://github.com/evgenyneu/Dodo/blob/master/Distrib/DodoDistrib.swift) file into your Xcode project.\n\n**Setup with Carthage**\n\nAdd `github \"evgenyneu/Dodo\" ~\u003e 13.0` to your Cartfile and run `carthage update`.\n\n**Setup with CocoaPods**\n\nIf you are using CocoaPods add this text to your Podfile and run `pod install`.\n\n    use_frameworks!\n    target 'Your target name'\n    pod 'Dodo', '~\u003e 13.0'\n\n\n#### Setup with Swift Package Manager\n\n* In Xcode 11+ select *File \u003e Packages \u003e Add Package Dependency...*.\n* Enter this project's URL: https://github.com/evgenyneu/Dodo.git\n\n\n\n#### Legacy Swift versions\n\nSetup a [previous version](https://github.com/evgenyneu/Dodo/wiki/Legacy-Swift-versions) of the library if you use an older version of Swift.\n\n\n## Usage\n\nAdd `import Dodo` to your source code (unless you used the file setup method).\n\nDodo is an extension of UIView class. You can reach it by using using the `dodo` property in any instance of UIView or its subclass. It can be, for example, the `view` property of your view controller.\n\n\n### Show and hide message bar\n\n\n```Swift\nview.dodo.success(\"Everybody has won and all must have prizes.\")\nview.dodo.info(\"Extinction is the rule. Survival is the exception.\")\nview.dodo.warning(\"This world is but a canvas to our imagination.\")\nview.dodo.error(\"The perception of beauty is a moral test.\")\n\nview.dodo.hide()\n```\n\nIf you are showing the bar in the root view you may need to provide top or bottom anchors. This will prevent the message bar from overlapping with the status or the tab bar.\n\n```Swift\nview.dodo.topAnchor = view.safeAreaLayoutGuide.topAnchor\nview.dodo.bottomAnchor = view.safeAreaLayoutGuide.bottomAnchor\nview.dodo.success(\"I solemnly swear to avoid the notch.\")\n```\n\nAlternatively, you can specify the anchors from the layout guides:\n\n```Swift\nview.dodo.topAnchor = topLayoutGuide.bottomAnchor\nview.dodo.bottomAnchor = bottomLayoutGuide.topAnchor\nview.dodo.success(\"I solemnly swear to avoid the notch.\")\n```\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/presets/success.jpg'\nalt='Dodo success presets' width='414'\u003e\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/presets/info.jpg'\nalt='Dodo info presets' width='414'\u003e\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/presets/warning.jpg'\nalt='Dodo warning presets' width='414'\u003e\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/presets/error.jpg'\nalt='Dodo error presets' width='414'\u003e\n\n### Styling\n\nSet `dodo.style` property to style the message bar **before** it is shown. See the [styling manual](https://github.com/evgenyneu/Dodo/wiki/Styling) for the complete list of configuration options.\n\n```Swift\n// Set the text color\nview.dodo.style.label.color = UIColor.white\n\n// Set background color\nview.dodo.style.bar.backgroundColor = DodoColor.fromHexString(\"#00000090\")\n\n// Close the bar after 3 seconds\nview.dodo.style.bar.hideAfterDelaySeconds = 3\n\n// Close the bar when it is tapped\nview.dodo.style.bar.hideOnTap = true\n\n// Show the bar at the bottom of the screen\nview.dodo.style.bar.locationTop = false\n\n// Do something on tap\nview.dodo.style.bar.onTap = { /* Tapped on the bar */ }\n```\n\n### Add buttons or icons\n\nSet `style.leftButton` and `style.rightButton` properties to show buttons or icons. As with other style properties please style the buttons **before** the message is shown.\n\n```Swift\n// Use a built-in icon\nview.dodo.style.leftButton.icon = .close\n\n// Supply your image\nview.dodo.style.leftButton.image = UIImage(named: \"CloseIcon\")\n\n// Change button's image color\nview.dodo.style.leftButton.tintColor = DodoColor.fromHexString(\"#FFFFFF90\")\n\n// Do something on tap\nview.dodo.style.leftButton.onTap = { /* Button tapped */ }\n\n// Close the bar when the button is tapped\nview.dodo.style.leftButton.hideOnTap = true\n```\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/buttons/left_button.jpg'\nalt='Dodo bar with left buttons' width='414'\u003e\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/buttons/left_and_right_button.jpg'\nalt='Dodo bar with right and left buttons' width='414'\u003e\n\n### Customize animation\n\nConfigure the animation effect of the bar before it is shown. See the [animation wiki page](https://github.com/evgenyneu/Dodo/wiki/Animating) for more information.\n\n\n```Swift\n// Use existing animations\nview.dodo.style.bar.animationShow = DodoAnimations.rotate.show\nview.dodo.style.bar.animationHide = DodoAnimations.slideRight.hide\n\n// Turn off animation\nview.dodo.style.bar.animationShow = DodoAnimations.noAnimation.show\n```\n\n### Unit testing\n\nSometimes it is useful to verify which messages were shown by your app in unit tests. It can be done\nby setting an instance of `DodoMock` class to `view.dodo` property.\n\nSee the [unit testing manual](https://github.com/evgenyneu/Dodo/wiki/Unit-testing) for more details.\n\n\n## Known limitations\n\n* Dodo messages [can not be shown](https://github.com/evgenyneu/Dodo/issues/2) in a `UITableViewController`.\n\n\n\n### Using Dodo from Objective-C\n\n[This manual](https://github.com/evgenyneu/Dodo/wiki/Using-Dodo-in-Objective-C-project) describes how to show Dodo messages in Objective-C apps.\n\n\n\n\n## Demo iOS app\n\nThis project includes a demo app.\n\n\u003cimg src='https://raw.githubusercontent.com/evgenyneu/Dodo/master/Graphics/dodo_demo_ios_app.jpg' width='414' alt='Dodo message bar demo iOS app'\u003e\n\n## Thanks 👍\n\n* [sai-prasanna](https://github.com/sai-prasanna) for Swift 2.2 update.\n\n\n\n## Quotes credits\n\n#### Albert Einstein\n\n\u003e Information is not knowledge.\n\n\n#### Carl Sagan\n\n\u003e Extinction is the rule. Survival is the exception.\n\n\n#### George S. Patton\n\n\u003e Success is how high you bounce when you hit bottom.\n\n#### Henry David Thoreau\n\n\u003e This world is but a canvas to our imagination.\n\n\u003e The perception of beauty is a moral test.\n\n#### Joe Namath\n\n\u003e When you win, nothing hurts.\n\n\n#### Lewis Carroll\n\n\u003e Everybody has won and all must have prizes.\n\n\n#### Malcolm Forbes\n\n\u003e Failure is success if we learn from it.\n\n#### William Blake\n\n\u003e If the doors of perception were cleansed everything would appear to man as it is, Infinite.\n\n\n\n## Alternative solutions\n\n\nHere are some other message bar libraries for iOS:\n\n* [cezarywojcik/CWStatusBarNotification](https://github.com/cezarywojcik/CWStatusBarNotification)\n* [frankdilo/FDStatusBarNotifierView](https://github.com/frankdilo/FDStatusBarNotifierView)\n* [jaydee3/JDStatusBarNotification](https://github.com/jaydee3/JDStatusBarNotification)\n* [KrauseFx/TSMessages](https://github.com/KrauseFx/TSMessages)\n* [peterprokop/SwiftOverlays](https://github.com/peterprokop/SwiftOverlays)\n* [terryworona/TWMessageBarManager](https://github.com/terryworona/TWMessageBarManager)\n\n\n## License\n\nDodo is released under the [MIT License](LICENSE).\n\n\n## •ᴥ•\n\nThis project is dedicated to [the dodo](https://en.wikipedia.org/wiki/Dodo), species of flightless birds that lived on the island of Mauritius and became extinct in the 17th century.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgenyneu%2FDodo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevgenyneu%2FDodo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevgenyneu%2FDodo/lists"}