Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update KalGridView.m #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/KalGridView.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
#define SLIDE_UP 1
#define SLIDE_DOWN 2

const CGSize kTileSize = { 46.f, 44.f };
//const CGSize kTileSize = { 46.f, 44.f };
static CGSize kTileSize;
const CGSize kTileIPAD = {110.f, 44.f}; //for iPAD
const CGSize kTileIPHONE = { 46.f, 44.f }; //for iPhone

static NSString *kSlideAnimationId = @"KalSwitchMonths";

Expand All @@ -41,6 +44,13 @@ - (id)initWithFrame:(CGRect)frame logic:(KalLogic *)theLogic delegate:(id<KalVie
// to accomodate all 7 columns. The 7th day's 2px inner stroke
// will be clipped off the screen, but that's fine because
// MobileCal does the same thing.

if ([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPhone)
kTileSize = kTileIPHONE;
else if ([[UIDevice currentDevice]userInterfaceIdiom]==UIUserInterfaceIdiomPad)
kTileSize = kTileIPAD;


frame.size.width = 7 * kTileSize.width;

if (self = [super initWithFrame:frame]) {
Expand Down