forked from jumartin/Calendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainViewController.h
executable file
·53 lines (31 loc) · 1.41 KB
/
MainViewController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// MainViewController.h
// CalendarDemo - Graphical Calendars Library for iOS
//
// Copyright (c) 2014-2015 Julien Martin. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <EventKitUI/EventKitUI.h>
@protocol CalendarViewControllerNavigation <NSObject>
@property (nonatomic, readonly) NSDate* centerDate;
- (void)moveToDate:(NSDate*)date animated:(BOOL)animated;
- (void)moveToNextPageAnimated:(BOOL)animated;
- (void)moveToPreviousPageAnimated:(BOOL)animated;
@optional
@property (nonatomic) NSSet* visibleCalendars;
@end
typedef UIViewController<CalendarViewControllerNavigation> CalendarViewController;
@protocol CalendarViewControllerDelegate <NSObject>
@optional
- (void)calendarViewController:(CalendarViewController*)controller didShowDate:(NSDate*)date;
- (void)calendarViewController:(CalendarViewController*)controller didSelectEvent:(EKEvent*)event;
@end
@interface MainViewController : UIViewController<CalendarViewControllerDelegate, EKCalendarChooserDelegate>
@property (nonatomic) CalendarViewController* calendarViewController;
@property (nonatomic, weak) IBOutlet UIView *containerView;
@property (nonatomic, weak) IBOutlet UILabel *currentDateLabel;
@property (nonatomic, weak) IBOutlet UIBarButtonItem *settingsButtonItem;
@property (nonatomic, weak) IBOutlet UISegmentedControl *viewChooser;
@property (nonatomic) NSCalendar *calendar;
@property (nonatomic) EKEventStore *eventStore;
@end