JLAlertView 0.0.6

JLAlertView 0.0.6

测试已测试
语言语言 SwiftSwift
许可证 MIT
版本最后发布2016年4月
SPM支持 SPM

Chester Liu维护。



  • Chester Liu

JLAlertView

使用 Swift 编写的 UIAlertView 替代品,具有现代的可链式 API 和高度可定制的 UI,灵感来自 SIAlertViewSweetAlert-iOS.

截图

screenshot

要求

  • iOS 9.0 和更高版本
  • Xcode 7.3(Swift 2.2)

安装

手动

JLAlertView.swift 添加到您的项目中。

使用

JLAlertView(title: "Default Style", message: "Standard Alert")
.addTextFieldWithConfigurationHandler({ (textField) in
    textField.placeholder = "Username"
})
.addTextFieldWithConfigurationHandler({ (textField) in
    textField.placeholder = "Password"
})
.addButttonWithTitle("Cancel", style: .Cancel, action: nil)
.addButttonWithTitle("OK", action:{(title, alert) in
    let username = alert.textFields[0].text
    let password = alert.textFields[1].text
    print(username)
    print(password)
})
.show()

许可证

MIT 许可证