-
Notifications
You must be signed in to change notification settings - Fork 0
/
KalView.h
executable file
·75 lines (63 loc) · 2.25 KB
/
KalView.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
72
73
74
75
/*
* Copyright (c) 2009 Keith Lazuka
* License: http://www.opensource.org/licenses/mit-license.html
*/
#import <UIKit/UIKit.h>
#import "KalGridView.h"
@class KalLogic;
@protocol KalViewDelegate, KalDataSourceCallbacks;
/*
* KalView
* ------------------
*
* Private interface
*
* As a client of the Kal system you should not need to use this class directly
* (it is managed by KalViewController).
*
* KalViewController uses KalView as its view.
* KalView defines a view hierarchy that looks like the following:
*
* +-----------------------------------------+
* | header view |
* +-----------------------------------------+
* | |
* | |
* | |
* | grid view |
* | (the calendar grid) |
* | |
* | |
* +-----------------------------------------+
* | |
* | table view (events) |
* | |
* +-----------------------------------------+
*
*/
@interface KalView : UIView
{
UILabel *headerTitleLabel;
KalLogic *logic;
}
@property (nonatomic, weak) id<KalViewDelegate> delegate;
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) KalGridView *gridView;
- (id)initWithFrame:(CGRect)frame delegate:(id<KalViewDelegate>)delegate logic:(KalLogic *)logic;
- (BOOL)isSliding;
- (void)markTilesForDates:(NSArray *)dates;
- (void)redrawEntireMonth;
// These 3 methods are exposed for the delegate. They should be called
// *after* the KalLogic has moved to the month specified by the user.
- (void)slideDown;
- (void)slideUp;
- (void)jumpToSelectedMonth; // change months without animation (i.e. when directly switching to "Today")
@end
#pragma mark -
@protocol KalViewDelegate
@optional
- (void)showPreviousMonth;
- (void)showFollowingMonth;
- (void)didSelectDate:(NSDate *)date;
- (void)didSelectBeginDate:(NSDate *)beginDate endDate:(NSDate *)endDate;
@end