AMZAlertController 1.0.3

AMZAlertController 1.0.3

Maintained by James Hickman.



AMZAlertController

Build Status Version License Platform Beerpay Beerpay

Introduction

AMZAlertController is a simple and modern alert controller which is better than but familiar to UIAlertController.

Single Button Double Button with Image Triple Button Blurred Background Clear Background Clear Background with Shadow Custom View

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 11.0+

Installation

AMZAlertController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'AMZAlertController'

Usage

Basic alert

let alertController = AMZAlertController.alertControllerWithTitle("Hello, World!", message: "This Is An Alert Controller!")
let alertAction = AMZAlertAction(withTitle: "Dismiss", style: .filled, handler: nil)
alertController.addAction(alertAction)
present(alertController, animated: true, completion: nil)

Add multiple actions

let okAction = AlertAction(withTitle: "OK", style: .filled, handler: nil)
let maybeAction = AlertAction(withTitle: "Maybe", style: .hollow, handler: nil)
let dismissAction = AlertAction(withTitle: "Dismiss", style: .default, handler: nil)
alertController.addActions([okAction, maybeAction, dismissAction])

Implement action handlers

let handlerAlertAction = AlertAction(withTitle: "Do Something", style: .filled, handler: { (alertAction) in
	print("Button was clicked!")
})

Background Styles

.transparent: Displays a transparent background over the presenting view controller (default)
.clear: Displays a clear background over the presenting view controller.
.blurred: Displays a blurred background over the presenting view controller.

Action Styles

.default: Displays a text based button (default)
.filled: Displays a color filled button.
.hollow: Displays a text based button with a border for a hollow look.

Author

Appmazo LLC, [email protected]

License

AMZAlertController is available under the MIT license. See the LICENSE file for more info.

Buy Me A Beer?

Beerpay