A Swift library that simplifies UIAlertController creation with one-line setup and closure-based button actions.
EZAlertController is a Swift library that simplifies the creation and management of UIAlertController instances in iOS apps. It provides a concise API to display alerts and action sheets with one-line setup and closure-based button handlers, reducing boilerplate code and improving readability.
iOS developers using Swift who want to streamline alert and action sheet implementation in their UIKit-based applications.
Developers choose EZAlertController for its minimalistic API that drastically reduces the code required for alerts compared to native UIKit, while still offering full customization capabilities when needed.
Easy Swift UIAlertController
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables one-line creation of alerts and action sheets, as shown in usage examples like `EZAlertController.alert("Title")`, drastically reducing boilerplate code compared to native UIKit.
Replaces selector methods with Swift closures for button actions, improving code readability and modern Swift practices, demonstrated in the button callback examples in the README.
Provides direct access to the underlying UIAlertController instance, allowing for advanced modifications such as setting attributed text and tint colors via key-value coding, per the customizable section.
Compatible with Objective-C projects through bridging headers, as shown in the example, making it versatile for mixed-language codebases.
Using properties like attributed titles requires manual key-value coding with `setValue`, which is not type-safe and can lead to runtime errors, as seen in the customization example in the README.
Only works with UIKit's UIAlertController, so it's not suitable for SwiftUI or cross-platform projects, and adds no new functionality beyond native alerts, making it a thin wrapper.
Requires Swift 4.0 or higher, with older versions like Swift 2.0 maintained in separate branches, which can cause fragmentation and upgrade issues for legacy code, as noted in the README.