Latest 0.0.3
Homepage https://github.com/ober01/EasyAlertController
License MIT
Platforms ios 8.0, requires ARC
Authors

UIAlertCotroller extensions for easy using

Requirements

  • iOS 8.0+
  • Xcode 7.3

Installation

Just add the EasyAlertController.swift to your project.

or use CocoaPods with Podfile:

pod 'EasyAlertController'

or Carthage users can simply add to their Cartfile:

github "ober01/EasyAlertController"

Usage

boring:

let actionSheet = UIAlertController(title: "title", message: "message", preferredStyle: .ActionSheet)

let action = UIAlertAction(title: "default", style: .Default, handler: {_ in print("tap")})
let cancel = UIAlertAction(title: "cancel", style: .Cancel, handler: {_ in print("tap")})
let destructive = UIAlertAction(title: "action", style: .Destructive, handler: {_ in print("tap")})

actionSheet.addAction(action)
actionSheet.addAction(cancel)
actionSheet.addAction(destructive)

presentViewController(alert, animated:true, completion:nil)

cool:

let actionSheet = UIAlertController.actionSheet(actions: [
  .Default(title: "Default", handler: { _ in print("tap")}),
  .Destructive(title: "Destructive", handler: { _ in print("tap")}),
  .Cancel(title: "Cancel", handler: nil)
  ])

  presentViewController(alert, animated:true, completion:nil)

Licence


EasyAlertController is released under the MIT license.
See LICENSE for details.

About

Any questions write [email protected]
follow @KalinkinAleksey

Latest podspec

{
    "name": "EasyAlertController",
    "version": "0.0.3",
    "summary": "UIAlertCotroller extensions for easy using",
    "license": "MIT",
    "homepage": "https://github.com/ober01/EasyAlertController",
    "authors": {
        "Alex Kalinkin": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ober01/EasyAlertController.git",
        "tag": "0.0.3"
    },
    "source_files": "EasyAletrController/EasyAlertController/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This