🌟 Naughty flexible alert view above the navigation bar, like QQ's. Da is a part of DaXia.
In me the tiger sniffs the rose.
心有猛虎,细嗅蔷薇。
Welcome to visit my blog:https://LeoDev.me
- iOS 8.0+
- Xcode 8.0+
- Swift 3.0+
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
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:
- Bug fixed.
-
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)
- Improve.
- Hello World!
-
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.