Latest 1.0
Homepage https://github.com/arasu01/ATAlertController
License MIT
Platforms ios 9.0, requires ARC

Platform
ATAlertController

UIAlertController for swift

Usage

One Button Alert

Alert(title: "Title", message: "Message")
    .addAction("OK")
    .show()

ATAlertController

Multiple Button Alerts

Alert(title: "Title", message: "Message")
    .addAction("Accept", style: .default, handler: { (action) in
        print("Accept action clicked")
    })
    .addAction("Cancel", style: .destructive, handler: { (action) in
        print("Cancel action clicked")
    })
    .show()

ATAlertController

Alerts with Text Field

var textField = UITextField()
Alert(title: "Title", message: "Message")
     .addTextField(&textField, required: true)
     .addAction("Ok", style: .default) { (action) in

     }
     .addAction("Cancel", style: .destructive) { (action) in

     }
     .show()

Action Sheet

ActionSheet(title: "Title", message: "Message")
     .addAction("Google Maps", style: .default, handler: { (action) in
         print("Google Maps action clicked")
     })
     .addAction("Apple Maps", style: .default, handler: { (action) in
         print("Apple Maps action clicked")
     })
     .addAction("Cancel", style: .cancel, handler: { (action) in
         print("Cancel action clicked")
     })
     .show()

ATAlertController

Requirements

  • Swift version 4.2
  • Xcode 10.0+

Installation

Install Manually

  • Download and drop ‘ATAlertController.swift’ in your project.

Improvement

  • Pull requests are welcomed.

Author

Arasu01

License

  • ATAlertController is available under the MIT license. See the LICENSE file.

Keywords

Swift, ActionSheet, AlertView, UIAlertViewController

Latest podspec

{
    "name": "ATAlertController",
    "version": "1.0",
    "summary": "UIAlertController for swift.",
    "homepage": "https://github.com/arasu01/ATAlertController",
    "license": "MIT",
    "authors": "Arasuvel",
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.2",
    "source": {
        "git": "https://github.com/arasu01/ATAlertController.git",
        "tag": "1.0"
    },
    "source_files": "ATAlertController/ATAlertController.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This