From b0c9ea3d8b30730b0c4e798f7c81d357e4f5daec Mon Sep 17 00:00:00 2001 From: GURATH Date: Wed, 13 Mar 2013 12:10:13 -0700 Subject: [PATCH] Update KalMonthView.m --- src/KalMonthView.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/KalMonthView.m b/src/KalMonthView.m index 8c9989b..fd72cdc 100644 --- a/src/KalMonthView.m +++ b/src/KalMonthView.m @@ -10,7 +10,10 @@ #import "KalDate.h" #import "KalPrivate.h" -extern const CGSize kTileSize; +//extern const CGSize kTileSize; +static CGSize kTileSize; +extern const CGSize kTileIPHONE; +extern const CGSize kTileIPAD; @implementation KalMonthView @@ -19,6 +22,12 @@ @implementation KalMonthView - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { + + if ([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPhone) + kTileSize = kTileIPHONE; + else if ([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPad) + kTileSize = kTileIPAD; + tileAccessibilityFormatter = [[NSDateFormatter alloc] init]; [tileAccessibilityFormatter setDateFormat:@"EEEE, MMMM d"]; self.opaque = NO;