A framework to display Toast Alerts in IOS.
- Toast View with Message & Image
- Toast View with Time Dismiss
- Toast View with Tap Dismiss
- Custom Toast View
- Using Xcode 11 go to File > Swift Packages > Add Package Dependency
- Paste the project URL: https://github.com/estampworld/ios-toast-alerts
- Click on next and select the project target
Add the following line to your Cartfile:
github "estampworld/ios-toast-alerts"
Run carthage update
Add the pod to your Podfile:
pod 'toastalerts'
And then run:
pod install
Show a Toast Alert with message and icon using ToastAlertView Object
let toastAlertView = ToastAlertView(message: "Hey!", image: UIImage(named: "Cat Icon")!)
toastAlertView.show()
//Toast Alert View with Time Dissmis Only
let toastAlertView = ToastAlertView(message: "4 Seconds", image: UIImage(systemName: "flame")!, hideWithType: .time(time: 4))
toastAlertView.show()
//Custom EW Toast Alert View
let toastAlertView = ToastAlertView()
toastAlertView.message = "Example"
toastAlertView.image = UIImage(named: "img1")!
toastAlertView.show()
//toastAlertView.dismiss() to Hide
Eduardo Irias, creator.
- Fork it ( https://github.com/[my-github-username]/ios-toast-alerts/fork )
- Create your feature branch (git checkout -b feature/[my-new-feature])
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin feature/[my-new-feature])
- Create a new Pull Request
Toast Alert Views is available under the MIT license. See the LICENSE file for more info.