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;