https://github.com/fpg1503/uitoast
🍻 An Objective-C class that adds Android-style toast notifications to iOS.
https://github.com/fpg1503/uitoast
Last synced: about 2 months ago
JSON representation
🍻 An Objective-C class that adds Android-style toast notifications to iOS.
- Host: GitHub
- URL: https://github.com/fpg1503/uitoast
- Owner: fpg1503
- License: mit
- Created: 2015-02-03T23:34:55.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-12-24T18:55:58.000Z (over 10 years ago)
- Last Synced: 2025-05-25T02:48:19.983Z (about 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UIToast
An Objective-C class that adds Android-style toast notifications to iOS.
[](https://travis-ci.org/fpg1503/UIToast)
[](http://cocoapods.org/pods/UIToast)
[](http://cocoapods.org/pods/UIToast)
[](http://cocoapods.org/pods/UIToast)
## Inspiration
`UIToast` is shamefully inspired on [Android toasts](http://developer.android.com/guide/topics/ui/notifiers/toasts.html). If you can I would recommend on **not using toasts on iOS**. If you don't have a choice (like me when I wrote this pod) this might just be the perfect lib for you.
## Usage
Usage is extremely simple and if you use it with Swift you'll think you're reading Android code (except for the lack of `context`s and semicolons :P).
```objective-c
NSString *text = @"Hello, UIToast!";
NSTimeInterval duration = 3.0;
[[UIToast makeText:text duration:duration] show];
```
or simply
```objective-c
[[UIToast makeText:@"Woah, that was easy!"] show];
```
## Contributing and future improvements
Feel free to open feature requests, issues and PRs. For now there is a small road map:
- [ ] Add Travis CI
- [ ] Create delegate for `UIToast`s
- [ ] Improve support for multiple toasts on screen
- [ ] Make it possible to customize position, color and font
- [ ] Support custom views as toasts
- [ ] Use autolayout