PopupDatePicker 1.0.2

PopupDatePicker 1.0.2

DessLi 维护。



  • 作者
  • DessLi

PopupDatePicker

Licence Version Swift Version Licence

Cards Feed


安装

CocoaPods (是什么?)

  1. pod 'PopupDatePicker' 添加到您的 Podfile 中;
  2. 然后在终端中运行 pod update
  3. 使用 .xcworkspace 重新打开您的项目,在您计划使用的 swift 文件中添加 import PopupDatePicker
  4. 重新构建并享受。

使用方法

首先,导入 PopupDatePicker

import PopupDatePicker

初始化

let datePicker = PopupDatePicker.init(currentDate: nil, minLimitDate: Date(), maxLimitDate: nil, dpShowType: "yyyy-MM-dd", wildcardArray: nil, wildcardDefaults: nil) {_,_ in }
datePicker.show()
/// PopupDatePicker
    ///
    /// - Parameters:
    ///   - currentDate: Current Date
    ///   - minLimitDate: min limit Date
    ///   - maxLimitDate: max limit Date
    ///   - dpShowType:
    /*
     - yyyy: year 1970
     - MM: month 01
     - dd: day 01
     - HH: hours 0..23
     - mm: minutes 0..59
     - ss: seconds 0..59
     - $: splitter of components for the picker view. yyyy$MM$dd
     - -: splitter of Year month day. yyyy-MM-dd
     - :: splitter of hour minute second. HH:mm:dd
     - ?{key}?: wildcard, something like ?hourange? the hourange is key, if use this flag you need set wildcard array
    */
    ///   - wildcardArray: if use DPShowType ?? flag you need set this param. Set DPShowType like ?key?$?key1? then set wildcardArray ["key":[ "a", "b" ], "key1":[ "c", "d" ]]
    ///   - wildcardDefaults: wildcardDefaults ["key": "value"]
    ///   - callback: (Date, [String:String]) -> (), first param is selected Date, second params is wildcard selected data

联系作者

请随意提交pull请求或提出更改。

电子邮件: [email 受保护的邮箱地址](/#)

许可证

PopupDatePicker基于MIT许可证发布。请参阅许可证文件