JLChen
2021-04-30 a5247b61d585627a1a7b1e1f35f34de9f0af9fba
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//
//  Copyright © 2020 dahua. All rights reserved.
//
 
#import <UIKit/UIKit.h>
 
NS_ASSUME_NONNULL_BEGIN
 
@interface LCDatePickResult : NSObject
//年份
@property (nonatomic) NSInteger year;
//月份 1-12
@property (nonatomic) NSInteger month;
//周 1-5
@property (nonatomic) NSInteger weekOfMonth;
//周 1-52
@property (nonatomic) NSInteger weekOfYear;
//周几 1-7
@property (nonatomic) NSInteger weekDay;
//日期 1-31
@property (nonatomic) NSInteger day;
//小时 0-23
@property (nonatomic) NSInteger hour;
//分钟 0-59
@property (nonatomic) NSInteger minute;
//秒 0-59
@property (nonatomic) NSInteger second;
 
@end
 
@interface LCDatePick : UIView
 
#pragma mark - display
 
/// 初始化pickview
+(LCDatePick*(^)(void))initialize;
/// 弹出pick
-(LCDatePick *(^)(void))start;
/// 消失
-(LCDatePick *(^)(void))dismiss;
 
#pragma mark - config
 
/// 向pick中添加年
-(LCDatePick*(^)(void))addYear;
/// 向pick中添加月
-(LCDatePick*(^)(void))addMonth;
/// 向pick中添加一年中周数
-(LCDatePick*(^)(void))addWeekOfYear;
/// 向pick中添加一月中周数
-(LCDatePick*(^)(void))addWeekOfMonth;
/// 向pick中添加周几
-(LCDatePick*(^)(void))addWeekDay;
/// 向pick中添加天
-(LCDatePick*(^)(void))addDay;
/// 向pick中添加小时
-(LCDatePick*(^)(void))addHour;
/// 向pick中添加分钟
-(LCDatePick*(^)(void))addMinute;
/// 向pick中添加n秒
-(LCDatePick*(^)(void))addSecond;
/// 取消按钮文字显示
-(LCDatePick*(^)(NSString * cancleTitle))cancleTitle;
/// 确认按钮文字显示
-(LCDatePick*(^)(NSString * confirmTitle))confirmTitle;
/// 主题显示
-(LCDatePick*(^)(NSString * title))title;
///// 是否需要无限循环
//-(LCDatePick*(^)(BOOL circle))circle;
/// 从今年开始最小年份例:1988
-(LCDatePick*(^)(NSInteger min))minYear;
/// 从今年开始最大年份
-(LCDatePick*(^)(NSInteger max))maxYear;
 
#pragma mark - action
/// 取消按钮点击事件
-(LCDatePick*)cancleHandle:(void(^)(void))resultBlock;
/// 确定按钮点击事件
-(LCDatePick*)confirmHandle:(void(^)(LCDatePickResult * result))resultBlock;
/// 页面消失时事件
-(LCDatePick*)dismissHandle:(void(^)(void))resultBlock;
 
@end
 
NS_ASSUME_NONNULL_END