在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:squimer/DatePickerDialog-iOS-Swift开源软件地址:https://github.com/squimer/DatePickerDialog-iOS-Swift开源编程语言:Swift 95.1%开源软件介绍:DatePickerDialog 4.0 - iOS - SwiftDatePickerDialog is an iOS drop-in classe that displays an UIDatePicker within an UIAlertView. RequirementsDatePickerDialog works on iOS 7, 8 and 9, 10, 11, 12, 13 and 14. It depends on the following Apple frameworks, which should already be included with most Xcode templates:
Swift Versions
InstallationCocoaPodsYou can use CocoaPods to install platform :ios, '8.0'
use_frameworks!
pod 'DatePickerDialog' To get the full benefits import import UIKit
import DatePickerDialog CarthageCreate a
Manually
Examplefunc datePickerTapped() {
DatePickerDialog().show(title: "DatePicker", doneButtonTitle: "Done", cancelButtonTitle: "Cancel", datePickerMode: .date) { date in
if let dt = date {
let formatter = DateFormatter()
formatter.dateFormat = "MM/dd/yyyy"
self.textField.text = formatter.string(from: dt)
}
}
} Dialog parameters
Example without 'Cancel' button: DatePickerDialog(showCancelButton: false).show(title: "DatePicker", doneButtonTitle: "Done", datePickerMode: .date) Example with custom locale: DatePickerDialog(locale: Locale(identifier: "es_PY")).show(title: "DatePicker", doneButtonTitle: "Done", datePickerMode: .date) Show parameters
Special thanks to
LicenseThis code is distributed under the terms and conditions of the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论