Skip to content

Commit

Permalink
Fixed calling of calendar delegate methods in the popover class
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbilan committed May 3, 2014
1 parent 866d7ee commit 117f894
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
11 changes: 8 additions & 3 deletions ios_calendar/Base.lproj/Main_iPad.storyboard
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13C1021" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
<deployment defaultVersion="1552" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand Down Expand Up @@ -78,6 +79,10 @@
</constraints>
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="300" height="350"/>
<connections>
<outlet property="calendarView" destination="xoa-xD-Usj" id="Bme-l1-9Xh"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="rSE-0y-ZEs" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
Expand All @@ -89,4 +94,4 @@
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
</document>
11 changes: 8 additions & 3 deletions ios_calendar/Base.lproj/Main_iPhone.storyboard
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13C1021" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
<deployment defaultVersion="1552" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
</dependencies>
<scenes>
<!--Popover View Controller-->
Expand Down Expand Up @@ -33,6 +34,10 @@
</constraints>
</view>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="300" height="350"/>
<connections>
<outlet property="calendarView" destination="uE7-fI-3ji" id="0vB-tX-rNz"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="HVQ-IS-qwo" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
Expand Down Expand Up @@ -89,4 +94,4 @@
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
</document>
19 changes: 19 additions & 0 deletions ios_calendar/PopoverViewController.m
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,32 @@

@interface PopoverViewController ()

@property (weak, nonatomic) IBOutlet CalendarView *calendarView;

@end

@implementation PopoverViewController

- (void)viewDidLoad
{
[super viewDidLoad];

self.calendarView.calendarDelegate = self;
}

- (void)didChangeCalendarDate:(NSDate *)date
{
NSLog(@"didChangeCalendarDate:%@", date);
}

- (void)didChangeCalendarDate:(NSDate *)date withType:(NSInteger)type withEvent:(NSInteger)event
{
NSLog(@"didChangeCalendarDate:%@ withType:%d withEvent:%d", date, type, event);
}

- (void)didDoubleTapCalendar:(NSDate *)date withType:(NSInteger)type
{
NSLog(@"didDoubleTapCalendar:%@ withType:%d", date, type);
}

@end

0 comments on commit 117f894

Please sign in to comment.