Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 50b02e2d91
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (40 sloc) 1.938 kb
* 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.
* -------------
* 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;
Jump to Line
Something went wrong with that request. Please try again.