Last active
August 23, 2017 18:32
-
-
Save ykws/ff74c7b3e08916d9abf0727c78bbfd9d to your computer and use it in GitHub Desktop.
For ActionSheetDatePicker, set disable before today.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ActionSheetDemoViewController: UIViewController { | |
@IBAction func showDatePicker(_ sender: UIButton) { | |
guard let actionSheetDatePicker = ActionSheetDatePicker.init(title: "Set date", datePickerMode: .date, selectedDate: Date(), doneBlock: { | |
picker, value, index in | |
/* doneBlock */ | |
}, cancel: { ActionDateCancelBlock in return }, origin: sender.superview!.superview) else { | |
return | |
} | |
actionSheetDatePicker.minimumDate = Date() | |
actionSheetDatePicker.show() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment