-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMWDatePicker.h
71 lines (47 loc) · 1.97 KB
/
MWDatePicker.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//
// MWDatePicker.h
// MWDatePicker
//
// Created by Marcus on 06.06.13.
// Copyright (c) 2013 mwermuth.com. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@protocol MWPickerDataSource;
@protocol MWPickerDelegate;
@interface MWDatePicker : UIView <UITableViewDelegate, UITableViewDataSource> {
CGFloat rowHeight;
CGFloat centralRowOffset;
NSArray *minutes;
NSArray *hours;
NSMutableArray *day;
NSDate *minDate;
BOOL shouldUseShadows;
}
@property (nonatomic, strong) id<MWPickerDelegate> delegate;
@property (nonatomic, copy)NSCalendar *calendar;
@property (nonatomic, strong)UIColor *fontColor;
- (UITableView *)tableViewForComponent:(NSInteger)component;
- (NSInteger)selectedRowInComponent:(NSInteger)component;
- (void)selectRow:(NSInteger)row inComponent:(NSInteger)component animated:(BOOL)animated;
- (void)reloadData;
- (void)update;
- (void)reloadDataInComponent:(NSInteger)component;
- (void)setShouldUseShadows:(BOOL)useShadows;
- (NSDate*)getDate;
- (void)setDate:(NSDate *)date animated:(BOOL)animated;
- (void)setMinimumDate:(NSDate *)minDate;
@end
@protocol MWPickerDelegate <NSObject>
@optional
- (void)datePicker:(MWDatePicker*)picker didSelectRow:(NSInteger)row inComponent:(NSInteger)component;
- (void)datePicker:(MWDatePicker *)picker didClickRow:(NSInteger)row inComponent:(NSInteger)component;
- (UIView *)backgroundViewForDatePicker:(MWDatePicker*)picker;
- (UIColor *)backgroundColorForDatePicker:(MWDatePicker*)picker;
- (UIView *)datePicker:(MWDatePicker*)picker backgroundViewForComponent:(NSInteger)component;
- (UIColor *)datePicker:(MWDatePicker*)picker backgroundColorForComponent:(NSInteger)component;
- (UIView *)overlayViewForDatePickerSelector:(MWDatePicker *)picker;
- (UIColor *)overlayColorForDatePickerSelector:(MWDatePicker *)picker;
- (UIView *)viewForDatePickerSelector:(MWDatePicker *)picker;
- (UIColor *)viewColorForDatePickerSelector:(MWDatePicker *)picker;
@end