EasyAlertController 0.0.3

EasyAlertController 0.0.3

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布上次发布2016年8月
SPM支持 SPM

ober01 维护。



  • Alex Kalinkin

EasyAlertController

袋UIAlertCotroller 以便于使用

要求

  • iOS 8.0+
  • Xcode 7.3

安装

只需将 EasyAlertController.swift 添加到您的项目中。

或者使用 CocoaPods 和 Podfile

pod 'EasyAlertController'

或者 Carthage 用户可以简单地将其添加到他们的 Cartfile

github "ober01/EasyAlertController"

用法

无聊的

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)

酷的

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

许可证

​ EasyAlertController 以 MIT 许可证发布。有关详细信息,请参阅 LICENSE。 ​

关于

如有任何问题,请写信至 [email protected] 关注 @KalinkinAleksey