Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

select current date (and not first of the month) if scrolling to curr…

…ent month. This is how MobileCal does it
  • Loading branch information...
commit 88d3f6ff768ff4ddce38647d211ad061b8231da3 1 parent 82a4d8d
authored May 18, 2010

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. 8  Kal/KalGridView.m
8  Kal/KalGridView.m
@@ -204,8 +204,12 @@ - (void)slide:(int)direction
204 204
                  || (direction == SLIDE_DOWN && [logic.daysInFirstWeekOfFollowingMonth count] > 0);
205 205
   
206 206
   [self swapMonthsAndSlide:direction keepOneRow:keepOneRow];
207  
-  
208  
-  self.selectedTile = [frontMonthView firstTileOfMonth];
  207
+
  208
+  if ([[[NSDate date] cc_dateByMovingToFirstDayOfTheMonth] isEqual:[[frontMonthView firstTileOfMonth].date NSDate]]) {
  209
+    self.selectedTile = [frontMonthView tileForDate:[KalDate dateFromNSDate:[[NSDate date] cc_dateByMovingToBeginningOfDay]]];
  210
+  } else {
  211
+    self.selectedTile = [frontMonthView firstTileOfMonth];
  212
+  }
209 213
 }
210 214
 
211 215
 - (void)slideUp { [self slide:SLIDE_UP]; }

0 notes on commit 88d3f6f

Please sign in to comment.
Something went wrong with that request. Please try again.