## Toast-Swift
Toast-Swift is a lightweight library that provides a simple and customizable way to display toast notifications in a Swift iOS app. It offers an efficient solution for displaying temporary messages or alerts, ensuring a smooth and unobtrusive user experience. With Toast-Swift, developers can easily implement non-intrusive and visually appealing toast messages that can inform users about important updates or provide feedback.
### Key Features
– Easy integration and usage in Swift iOS projects
– Customizable appearance, including text, background color, and duration of the toast
– Toasts can be displayed at different positions on the screen
– Option to display an icon or image alongside the text content
– Support for both short-duration toasts and long-duration persistent toasts
– Ability to dismiss a toast programmatically or by user interaction
– Accessibility support for VoiceOver and UI testing
– Smooth animations and transitions for a visually pleasing experience
### Installation
To integrate Toast-Swift into your project, follow these steps:
1. Add the library to your project through Swift Package Manager or CocoaPods.
– For CocoaPods, add `pod ‘Toast-Swift’` to your Podfile and run `pod install`.
– For Swift Package Manager, add `https://github.com/scalessec/Toast-Swift.git` as a package dependency in Xcode.
2. Import the Toast-Swift module in your source file.
“`swift
import Toast_Swift
“`
3. That’s it! You’re ready to use Toast-Swift in your project.
### Usage
Using Toast-Swift is straightforward and only requires a few lines of code.
1. Displaying a basic toast message:
“`swift
view.makeToast(“Hello, world!”)
“`
2. Customizing the appearance of the toast message:
“`swift
view.makeToast(“Hello, world!”, duration: 2.0, position: .bottom, title: “Notification”, image: UIImage(named: “icon_info”))
“`
3. Dismissing the toast programmatically:
“`swift
view.hideToast()
“`
4. Additional customization options and advanced usage scenarios can be found in the [official documentation](https://github.com/scalessec/Toast-Swift).
### Contributing
Contributions to Toast-Swift are welcome! If you encounter any issues or have suggestions for improvements, please submit an issue on the GitHub repository.
To contribute code changes:
1. Fork the repository.
2. Create a new branch for your changes.
3. Make your modifications and improvements.
4. Test the changes thoroughly.
5. Submit a pull request detailing the changes you made.
Toast-Swift offers an excellent solution for displaying toast notifications in Swift iOS apps. Its ease of use and customizable options make it a reliable choice for implementing toast messages. Start using Toast-Swift today to enhance the user experience in your app and provide important alerts and notifications.