WSDatePickerView.h
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// WSDatePickerView.h
// WSDatePicker
//
// Created by iMac on 17/2/23.
// Copyright © 2017年 zws. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "NSDate+Extension.h"
/**
* 弹出日期类型
*/
typedef enum {
DateStyleShowYearMonthDayHourMinute = 0, // 年月日时分
DateStyleShowMonthDayHourMinute, // 月日时分
DateStyleShowYearMonthDay, // 年月日
DateStyleShowMonthDay, // 月日
DateStyleShowHourMinute // 时分
} WSDateStyle;
@interface WSDatePickerView : UIView
/**
* 滚轮日期颜色(默认黑色)
*/
@property (nonatomic,strong) UIColor *datePickerColor;
/**
* 选中日期颜色
*/
@property (nonatomic,strong) UIColor *selectedPickerColor;
/**
* 选中分割线颜色
*/
@property (nonatomic,strong) UIColor *selectedLineColor;
/**
* 限制最小时间(默认0) datePicker小于最小日期则滚动回最小限制日期
*/
@property (nonatomic, retain) NSDate *minLimitDate;
/**
* 限制最大时间(默认2099)datePicker大于最大日期则滚动回最大限制日期
*/
@property (nonatomic, retain) NSDate *maxLimitDate;
/**
默认滚动到当前时间
*/
- (instancetype)initWithDateStyle:(WSDateStyle)datePickerStyle CompleteBlock:(void(^)(NSDate *))completeBlock;
/**
滚动到指定的的日期
*/
- (instancetype)initWithDateStyle:(WSDateStyle)datePickerStyle scrollToDate:(NSDate *)scrollToDate CompleteBlock:(void(^)(NSDate *))completeBlock;
/**
显示
*/
- (void)show;
@end