Skip to content

Commit 117f894

Browse files
committed
Fixed calling of calendar delegate methods in the popover class
1 parent 866d7ee commit 117f894

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

ios_calendar/Base.lproj/Main_iPad.storyboard

100644100755
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<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">
2+
<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">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
4+
<deployment defaultVersion="1552" identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
56
</dependencies>
67
<scenes>
78
<!--View Controller-->
@@ -78,6 +79,10 @@
7879
</constraints>
7980
</view>
8081
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
82+
<size key="freeformSize" width="300" height="350"/>
83+
<connections>
84+
<outlet property="calendarView" destination="xoa-xD-Usj" id="Bme-l1-9Xh"/>
85+
</connections>
8186
</viewController>
8287
<placeholder placeholderIdentifier="IBFirstResponder" id="rSE-0y-ZEs" userLabel="First Responder" sceneMemberID="firstResponder"/>
8388
</objects>
@@ -89,4 +94,4 @@
8994
<simulatedOrientationMetrics key="orientation"/>
9095
<simulatedScreenMetrics key="destination"/>
9196
</simulatedMetricsContainer>
92-
</document>
97+
</document>

ios_calendar/Base.lproj/Main_iPhone.storyboard

100644100755
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<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">
2+
<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">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
4+
<deployment defaultVersion="1552" identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
56
</dependencies>
67
<scenes>
78
<!--Popover View Controller-->
@@ -33,6 +34,10 @@
3334
</constraints>
3435
</view>
3536
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
37+
<size key="freeformSize" width="300" height="350"/>
38+
<connections>
39+
<outlet property="calendarView" destination="uE7-fI-3ji" id="0vB-tX-rNz"/>
40+
</connections>
3641
</viewController>
3742
<placeholder placeholderIdentifier="IBFirstResponder" id="HVQ-IS-qwo" userLabel="First Responder" sceneMemberID="firstResponder"/>
3843
</objects>
@@ -89,4 +94,4 @@
8994
<simulatedOrientationMetrics key="orientation"/>
9095
<simulatedScreenMetrics key="destination" type="retina4"/>
9196
</simulatedMetricsContainer>
92-
</document>
97+
</document>

ios_calendar/PopoverViewController.m

100644100755
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,32 @@
1010

1111
@interface PopoverViewController ()
1212

13+
@property (weak, nonatomic) IBOutlet CalendarView *calendarView;
14+
1315
@end
1416

1517
@implementation PopoverViewController
1618

19+
- (void)viewDidLoad
20+
{
21+
[super viewDidLoad];
22+
23+
self.calendarView.calendarDelegate = self;
24+
}
25+
1726
- (void)didChangeCalendarDate:(NSDate *)date
1827
{
1928
NSLog(@"didChangeCalendarDate:%@", date);
2029
}
2130

31+
- (void)didChangeCalendarDate:(NSDate *)date withType:(NSInteger)type withEvent:(NSInteger)event
32+
{
33+
NSLog(@"didChangeCalendarDate:%@ withType:%d withEvent:%d", date, type, event);
34+
}
35+
36+
- (void)didDoubleTapCalendar:(NSDate *)date withType:(NSInteger)type
37+
{
38+
NSLog(@"didDoubleTapCalendar:%@ withType:%d", date, type);
39+
}
40+
2241
@end

0 commit comments

Comments
 (0)