-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathUUDatePicker.h
executable file
·56 lines (42 loc) · 1.77 KB
/
UUDatePicker.h
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
//
// UUDatePicker.h
// Yang
//
// Created by shake on 14-7-24.
// Copyright (c) 2014年 uyiuyao. All rights reserved.
//
#import <UIKit/UIKit.h>
@class UUDatePicker;
typedef enum{
UUDateStyle_YearMonthDayHourMinute = 0,
UUDateStyle_YearMonthDay,
UUDateStyle_MonthDayHourMinute,
UUDateStyle_HourMinute,
UUDateStyle_YearMonth
}DateStyle;
typedef void (^FinishBlock)(NSString * year,
NSString * month,
NSString * day,
NSString * hour,
NSString * minute,
NSString * weekDay);
// 说明,uuDatePicker的Size最小是320x216的。
@protocol UUDatePickerDelegate <NSObject>
- (void)uuDatePicker:(UUDatePicker *)datePicker
year:(NSString *)year
month:(NSString *)month
day:(NSString *)day
hour:(NSString *)hour
minute:(NSString *)minute
weekDay:(NSString *)weekDay;
@end
@interface UUDatePicker : UIView<UIPickerViewDelegate,UIPickerViewDataSource>
@property (nonatomic, assign) id <UUDatePickerDelegate> delegate;
@property (nonatomic, assign) DateStyle datePickerStyle;
@property (nonatomic, retain) NSDate *ScrollToDate;//滚到指定日期
@property (nonatomic, retain) NSDate *maxLimitDate;//限制最大时间(没有设置默认2049)
@property (nonatomic, retain) NSDate *minLimitDate;//限制最小时间(没有设置默认1970)
- (NSDate *)dateFromString:(NSString *)string withFormat:(NSString *)format;
- (id)initWithframe:(CGRect)frame Delegate:(id<UUDatePickerDelegate>)delegate PickerStyle:(DateStyle)uuDateStyle;
- (id)initWithframe:(CGRect)frame PickerStyle:(DateStyle)uuDateStyle didSelected:(FinishBlock)finishBlock;
@end