Skip to content

Commit

Permalink
Updated the README
Browse files Browse the repository at this point in the history
  • Loading branch information
klazuka committed Mar 11, 2010
1 parent a3d7eaa commit 9b39522
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions HolidaysDemo/HolidayAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ - (void)showAndSelectToday
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
Holiday *holiday = [dataSource holidayAtIndexPath:indexPath];
HolidaysDetailViewController *vc = [[HolidaysDetailViewController alloc] initWithHoliday:holiday];
HolidaysDetailViewController *vc = [[[HolidaysDetailViewController alloc] initWithHoliday:holiday] autorelease];
[navController pushViewController:vc animated:YES];
[vc release];
}

#pragma mark -
Expand Down
3 changes: 1 addition & 2 deletions HolidaysDemo/HolidaysDetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ - (id)initWithHoliday:(Holiday *)aHoliday

- (void)loadView
{
UILabel *label = [[UILabel alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
UILabel *label = [[[UILabel alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
label.text = [NSString stringWithFormat:@"%@ - %@", holiday.country, holiday.name];
label.textAlignment = UITextAlignmentCenter;
self.view = label;
[label release];
}

- (void)dealloc
Expand Down
8 changes: 7 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ KalDataSource.h and the included demo app for more details.
Release Notes
-------------

**March 11, 2010**

A lot of people have emailed me asking for support for selecting and displaying an arbitrary date on the calendar. So today I pushed some commits that make this easy to do. You can specify which date should be initially selected and shown when the calendar is first created by using -[KalViewController initWithSelectedDate:]. If you would like to programmatically switch the calendar to display the month for an arbitrary date and select that date, use -[KalViewController showAndSelectDate:].

**January 1, 2010**

I have made significant changes to the KalDataSource API so that the client
Expand Down Expand Up @@ -47,10 +51,12 @@ an implementation of the KalDataSource protocol. Then all you need to do
to display your annotated calendar is instantiate the KalViewController
and tell it to use your KalDataSource implementation (in this case, "MyKalDataSource"):

id<KalDataSource> source = [[[MyKalDataSource alloc] init] autorelease];
id<KalDataSource> source = [[MyKalDataSource alloc] init];
KalViewController *calendar = [[[KalViewController alloc] initWithDataSource:source] autorelease];
[self.navigationController pushViewController:calendar animated:YES];

NOTE: KalViewController does not retain its datasource. You probably will want to store a reference to the dataSource in an instance variable so that you can release it after the calendar has been destroyed.

Additional Notes
----------------

Expand Down

0 comments on commit 9b39522

Please sign in to comment.