forked from klazuka/Kal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KalViewController's designated initializer is now 'init'. HolidaysDem…
…o now shows how to push a details view controller when the user taps a holiday listed below the calendar.
- Loading branch information
Showing
11 changed files
with
143 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2009 Keith Lazuka | ||
* License: http://www.opensource.org/licenses/mit-license.html | ||
*/ | ||
|
||
@class Holiday; | ||
|
||
/* | ||
* HolidaysDetailViewController | ||
* ---------------------------- | ||
* | ||
* This view controller will be pushed onto the navigation stack | ||
* when the user taps the row for a holiday beneath the calendar. | ||
*/ | ||
@interface HolidaysDetailViewController : UIViewController | ||
{ | ||
Holiday *holiday; | ||
} | ||
|
||
- (id)initWithHoliday:(Holiday *)holiday; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (c) 2009 Keith Lazuka | ||
* License: http://www.opensource.org/licenses/mit-license.html | ||
*/ | ||
|
||
#import "HolidaysDetailViewController.h" | ||
#import "Holiday.h" | ||
|
||
@implementation HolidaysDetailViewController | ||
|
||
- (id)initWithHoliday:(Holiday *)aHoliday | ||
{ | ||
if ((self = [super init])) { | ||
holiday = [aHoliday retain]; | ||
} | ||
return self; | ||
} | ||
|
||
- (void)loadView | ||
{ | ||
UILabel *label = [[UILabel alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; | ||
label.text = [NSString stringWithFormat:@"%@ - %@", holiday.country, holiday.name]; | ||
label.textAlignment = UITextAlignmentCenter; | ||
self.view = label; | ||
[label release]; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
[holiday release]; | ||
[super dealloc]; | ||
} | ||
|
||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters