From a170759f905d014a6773fb686f912e73c14740f6 Mon Sep 17 00:00:00 2001 From: GURATH Date: Wed, 13 Mar 2013 12:11:37 -0700 Subject: [PATCH] Update KalTileView.m --- src/KalTileView.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/KalTileView.m b/src/KalTileView.m index 785f3c4..7faf1e6 100644 --- a/src/KalTileView.m +++ b/src/KalTileView.m @@ -7,7 +7,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 KalTileView @@ -16,6 +19,12 @@ @implementation KalTileView - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { + if ([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPhone) + kTileSize = kTileIPHONE; + else if ([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPad) + kTileSize = kTileIPAD; + + self.opaque = NO; self.backgroundColor = [UIColor clearColor]; self.clipsToBounds = NO;