iOS system | Toasty |
---|---|
- Easy to implement.
- Highly customizable.
- Dark Mode support. 🌓
- 60FPS smooth animations.
- Interactive expanded view support.
- Top or bottom position support.
- Icon support.
Icon support | Customization | Update transition |
---|---|---|
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate Toasty into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
use_frameworks!
pod 'SideMenu', '~> 1.0'
Then, run the following command:
$ pod install
Coming soon!
Coming soon!
If you prefer not to use either of the aforementioned dependency managers, you can integrate sources in the Toasty
folder into your project manually.
You can get started by creating an instance of toasty and preparing it before you want to use it. Just make sure to prepare the toast when your ViewController
has entered a view hierarchy. (anything after viewDidAppear)
import Toasty
class ViewController: UIViewController {
let toast = Toasty()
override func viewDidLoad() {
super.viewDidLoad()
self.createUI()
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
self.toast.prepareToast(title: "Toasty!")
}
}
Then all you need is to use the show
function to show your toast!
self.toast.show(from: .top)
//or
self.toast.show(from: .bottom)
By default your toast will hide/dismiss automatically, but you can also do it manually.
toast.show(from: .top, autoDismiss: false)
//then hide it by using
toast.hide()
//or
toast.dismiss()
hide()
and dismiss()
both do the exact same thing.
There is a lot of code documentation in the project and you can use quick help to access these when ever you want.
For now you will have to use the in code documentation untill I update this README soon.
You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.
- Found a bug? Open an issue.
- Feature idea? Open an issue.
- Want to contribute? Submit a pull request.
Toasty is available under the MIT license, see the LICENSE file for more information.