TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Mar 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
In me the tiger sniffs the rose.
心有猛虎,细嗅蔷薇。
Welcome to visit my blog:https://LeoDev.me
If you prefer not to use the aforementioned dependency manager, you can integrate Da into your project manually.
Quick Start:
import Da
func showAlertQuickly() {
Da.showAlert(title: "温馨提示",
message: "您的账号已在其他设备登录,请您注意账号安全。",
cancelButtonTitle: "退出",
otherButtonTitles: nil)
}
Detailed:
func showAlertDetailedly() {
Da.hairColor = UIColor.orange
let da = Da(title: "温馨提示",
message: "您的账号已在其他设备登录,请您注意账号安全。",
cancelButtonTitle: "退出",
otherButtonTitles: "重新登录", "修改密码")
da.destructiveButtonIndexSet = Set(arrayLiteral: 0)
da.destructiveButtonColor = UIColor.orange
da.clickedHandle = { da, buttonIndex in
print("clickedHandle: \(buttonIndex), \(da.cancelButtonIndex)")
}
da.willPresentHanlder = { da in
print("willPresentHanlder, \(da.cancelButtonIndex)")
}
da.didPresentHanlder = { da in
print("didPresentHanlder, \(da.cancelButtonIndex)")
}
da.willDismissHandler = { da, buttonIndex in
print("willDismissHandler: \(buttonIndex), \(da.cancelButtonIndex)")
}
da.didDismissHandler = { da, buttonIndex in
print("didDismissHandler: \(buttonIndex), \(da.cancelButtonIndex)")
}
da.show()
}
// And more see Da.swift...
Resources:
Public some properties:
public static var titleFont: UIFont = UIFont.systemFont(ofSize: 20.0)
public static var messageFont: UIFont = UIFont.systemFont(ofSize: 16.0)
public static var buttonFont: UIFont = UIFont.systemFont(ofSize: 18.0)
If you have any question, just commit a issue.
Mail: echo bGVvZGF4aWFAZ21haWwuY29tCg== | base64 -D
Blog: https://LeoDev.me
Donations:
Please note: donation does not imply any type of service contract.
Da is released under the MIT License.