Skip to content

Commit

Permalink
Modified example for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbilan committed Aug 14, 2014
1 parent b49bcd9 commit d9e271d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions ios_calendar/Base.lproj/Main_iPad.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
<action selector="popoverButtonAction:" destination="BYZ-38-t0r" eventType="touchUpInside" id="wKI-KC-d7y"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="h6M-ja-ijv">
<rect key="frame" x="361" y="938" width="46" height="30"/>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="h6M-ja-ijv">
<rect key="frame" x="339" y="937" width="90" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button">
<state key="normal" title="Set date">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
Expand Down
4 changes: 2 additions & 2 deletions ios_calendar/Base.lproj/Main_iPhone.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
<action selector="popoverButtonAction:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="KCX-6d-5XV"/>
</connections>
</button>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dTn-aR-uFU">
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dTn-aR-uFU">
<rect key="frame" x="125" y="497" width="70" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button">
<state key="normal" title="Set date">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
Expand Down
9 changes: 5 additions & 4 deletions ios_calendar/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ - (IBAction)popoverButtonAction:(UIButton *)sender

- (IBAction)buttonTap:(id)sender
{
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *comps = [[NSDateComponents alloc] init];
comps.year = 2015;
comps.month= 1;
comps.day = 1;
NSDate *toDate = [[NSCalendar currentCalendar] dateFromComponents:comps];
comps.year = 2014;
comps.month= 9;
comps.day = 15;
NSDate *toDate = [cal dateFromComponents:comps];
[self.calendarView setCurrentDate:toDate];
}

Expand Down

0 comments on commit d9e271d

Please sign in to comment.