EasyAlertController 0.0.3

EasyAlertController 0.0.3

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Aug 2016
SPMSupports SPM

Maintained by ober01.



  • By
  • Alex Kalinkin

EasyAlertController

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)
  ])

Licence

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

About

Any questions write [email protected] follow @KalinkinAleksey