ag.calendar view not going full width

You must Login before you can answer or comment on any questions.

I only get 3 days "sun", "mon" "tue" then I get most of the calendar, but only 3 rows are active if I click the "next" button on the month.... it moves the month title to be properly centered for some reason. The mini list view that shows at the bottom of the calendar doesn't go full with either.

![vertical orientation](https://dl.dropbox.com/u/101794062/iOS%20Simulator%20Screen%20shot%20Oct%2031%2C%202012%203.01.07%20PM.png "Vertical orientation") ![horizontal orientation](https://dl.dropbox.com/u/101794062/iOS%20Simulator%20Screen%20shot%20Oct%2031%2C%202012%2010.35.51%20PM.png "Flipped horizontal")

— asked 7 months ago by Blake Rogers
4 Comments
  • What version of the module are you using ?

    — commented 7 months ago by Chris Magnussen

  • ag.calendar 1.2.3

    — commented 7 months ago by Blake Rogers

  • I found out that this is a problem with the module itself on iPad iOS 6. I would love to fix this, but am unsure where to begin.

    — commented 7 months ago by Blake Rogers

  • Show 1 more comment

1 Answer

In the KalViewController.m replace the following lines

CGRect rect = CGRectMake(0, 0, windowsRect.size.width, windowsRect.size.height);
    //CGRect rect = CGRectMake(0, 0, MIN(popoverRect.size.width, windowsRect.size.width),         MIN(popoverRect.size.height, windowsRect.size.height));

— answered 7 months ago by Blake Rogers
answer permalink
1 Comment
  • You'll also need to look for something like 109.f in the KalView.m It will be next the where it declares the array of shortDayNames or something very close to that. You will of course have to recompile the module properly using the build.py script in the source code for the module. Once that's done, re-integrate the module into your project and do a "Project >> Clean" that will solve some of your issues.

    There will probably be another issue where it looks perfect on iPad at that point....but, the days are off center on iPhone. To change that you have to use a variable to switch out the offset (which is right below the lines of code mentioned above.

    The next issue you will encounter is the "event marker" not being centered on iPad. You need to go back into the module code and find where the marker image is set I think the file is something like "KalTileView.m". Find the marker image and about 10 lines below that you'll need to create a variable like the following:

    CGFloat dynamicWidth = tilesize.width/2;
    Now find where the marker gets it's positioning. Should be right next to where you are now. Just change it from whatever the x position is to 'dynamicWidth' (or whatever you named the variable).

    — commented 7 months ago by Blake Rogers

Your Answer

Think you can help? Login to answer this question!