#if USE_UIKIT_PUBLIC_HEADERS || !__has_include()
//
// UIDatePicker.h
// UIKit
//
// Copyright (c) 2006-2018 Apple Inc. All rights reserved.
//
#import
#import
#import
NS_ASSUME_NONNULL_BEGIN
/* 日期选择器类型 <枚举> */
typedef NS_ENUM(NSInteger, UIDatePickerMode) {
UIDatePickerModeTime, /// 时-分(AM/PM可选)
UIDatePickerModeDate, /// 年-月-日
UIDatePickerModeDateAndTime, /// 月-日-星期-时-分(AM/PM可选)
UIDatePickerModeCountDownTimer, /// 时-分(此模式必须实现一个计时器NSTimer)
} __TVOS_PROHIBITED;
#pragma mark - 日期选择器 Class
#pragma mark -
NS_CLASS_AVAILABLE_IOS(2_0) __TVOS_PROHIBITED @interface UIDatePicker : UIControl
/// 日期选择器类型(默认:UIDatePickerModeDateAndTime)
@property (nonatomic) UIDatePickerMode datePickerMode;
/// 日期区域(默认值返回有关语言或文化方面的信息,例如日期格式的方式;默认:[NSLocale currentLocale])
@property (nullable, nonatomic, strong) NSLocale *locale;
/// 日期选择器日历(默认:[NSCalendar currentCalendar])
@property (null_resettable, nonatomic, copy) NSCalendar *calendar;
/// 日期选择器使用的时区(默认:nil)
@property (nullable, nonatomic, strong) NSTimeZone *timeZone;
/// 日期选择器显示的日期(默认:启动选择器时的当前时间)
@property (nonatomic, strong) NSDate *date;
/// 可选择的最小日期(min > max或倒计时模式此属性无效;默认:nil)
@property (nullable, nonatomic, strong) NSDate *minimumDate;
/// 可选择的最大日期(min > max或倒计时模式此属性无效;默认:nil)
@property (nullable, nonatomic, strong) NSDate *maximumDate;
/// 倒计时模式显示的时间(datePickerMode设置为UIDatePickerModeCountDownTimer时生效;最大值23:59;默认:0.0)
@property (nonatomic) NSTimeInterval countDownDuration;
/// 每分钟刷新的频率(最小为1,最大为30,必须均分60;默认:1)
@property (nonatomic) NSInteger minuteInterval;
// 设置日期选择器时间(是否带动画)
- (void)setDate:(NSDate *)date animated:(BOOL)animated;
@end
NS_ASSUME_NONNULL_END
#else
#import
#endif