-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathKal.h
executable file
·43 lines (40 loc) · 1.89 KB
/
Kal.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
/*
* The Kal UI component
* ------------------------
*
* The Kal system aims to mimic the month view in Apple's mobile calendar app.
* When the user taps a date on the calendar, any associated events for that date
* will be displayed in a table view directly below the calendar. As a client
* of this component, your only responibility is to provide the events for each date
* by providing an implementation of the KalDataSource protocol.
*
* EXAMPLE USAGE
* -------------
* Note: All of the following example code assumes that it is being called from
* within another UIViewController which is in a UINavigationController hierarchy.
*
* How to display a very basic calendar (without any events):
*
* KalViewController *calendar = [[[KalViewController alloc] init] autorelease];
* [self.navigationController pushViewController:calendar animated:YES];
*
* In most cases you will have some custom data that you want to attach
* to the dates on the calendar. Assuming that your implementation of the
* KalDataSource protocol is provided by "MyKalDataSource", then all you
* need to do to display your annotated calendar is the following:
*
* id<KalDataSource> source = [[[MyKalDataSource alloc] init] autorelease];
* KalViewController *calendar = [[[KalViewController alloc] initWithDataSource:source] autorelease];
* [self.navigationController pushViewController:calendar animated:YES];
*
* Note that "MyKalDataSource" will tell the system which days to mark with a
* dot and will provide the UITableViewCells that display the details for
* the currently selected date.
*
*/
#import "KalViewController.h"
#import "KalDataSource.h"
// The KalDataSource implementation should post this notification
// whenever its content has changed. Kal uses this notification to
// keep the UI in sync with the data source.
extern NSString *const KalDataSourceChangedNotification;