Da
In me the tiger sniffs the rose.
心有猛虎,细嗅蔷薇。
Welcome to visit my blog:https://LeoDev.me
Contents
Requirements
- iOS 8.0+
- Xcode 8.0+
- Swift 3.0+
Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.1.0+ is required to build Da.
To integrate Da into your Xcode project using CocoaPods, specify it in your Podfile
:
use_frameworks!
target '<Your Target Name>' do
pod 'Da'
end
Manually
If you prefer not to use the aforementioned dependency manager, you can integrate Da into your project manually.
Usage
-
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:
Preview
ChangeLog
V 0.0.2
- Improve.
V 0.0.1
- Hello World!
Support
If you have any question, just commit a issue.
Mail:
echo ZGV2dGlwQDE2My5jb20K | base64 -D
Blog: https://LeoDev.me
-
Friendly sponsorship with Alipay or Wechat Pay, thank you!
License
Da is released under the MIT License.