Da 0.0.4

Da 0.0.4

TestsTested ✗
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2017
SwiftSwift Version 3.0
SPMSupports SPM ✗

Maintained by Leo, Leo.



Da 0.0.4

Da

🌟 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

Contents

Requirements

  • iOS 8.0+
  • Xcode 8.0+
  • Swift 3.0+

Installation

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.4

  • Bug fixed.

V 0.0.3

  • 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)

V 0.0.2

  • Improve.

V 0.0.1

  • Hello World!

Support

  • If you have any question, just commit a issue.

  • Mail: echo bGVvZGF4aWFAZ21haWwuY29tCg== | base64 -D

  • Blog: https://LeoDev.me

  • Donations:

    • PayPal:

      Donate

    • Alipay or Wechat Pay:

      Donate with Alipay or Wechat Pay

    Please note: donation does not imply any type of service contract.

License

Da is released under the MIT License.