// // EKCalendarChooser.h // EventKitUI // // Copyright 2009-2010 Apple Inc. All rights reserved. // #import #import #import NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSInteger, EKCalendarChooserSelectionStyle) { EKCalendarChooserSelectionStyleSingle, EKCalendarChooserSelectionStyleMultiple }; typedef NS_ENUM(NSInteger, EKCalendarChooserDisplayStyle) { EKCalendarChooserDisplayAllCalendars, EKCalendarChooserDisplayWritableCalendarsOnly }; @protocol EKCalendarChooserDelegate; @class EKGroupInfo; EVENTKITUI_EXTERN @interface EKCalendarChooser : UIViewController - (id)initWithSelectionStyle:(EKCalendarChooserSelectionStyle)selectionStyle displayStyle:(EKCalendarChooserDisplayStyle)displayStyle eventStore:(EKEventStore *)eventStore; // variant to only show calendars for events or reminders. - (id)initWithSelectionStyle:(EKCalendarChooserSelectionStyle)style displayStyle:(EKCalendarChooserDisplayStyle)displayStyle entityType:(EKEntityType)entityType eventStore:(EKEventStore *)eventStore; @property(nonatomic, readonly) EKCalendarChooserSelectionStyle selectionStyle; @property(nonatomic, weak, nullable) id delegate; // When used in a navigation controller (presented modally), you can enable // the done/cancel buttons and get informed when pressed via the delegate. @property(nonatomic) BOOL showsDoneButton; @property(nonatomic) BOOL showsCancelButton; // Regardless of whether the chooser allows you to select one or multiple // calendars, the selection is always expressed as a set. @property(nonatomic, copy) NSSet *selectedCalendars; @end @protocol EKCalendarChooserDelegate @optional // Called whenever the selection is changed by the user - (void)calendarChooserSelectionDidChange:(EKCalendarChooser *)calendarChooser; // These are called when the corresponding button is pressed to dismiss the // controller. It is up to the recipient to dismiss the chooser. - (void)calendarChooserDidFinish:(EKCalendarChooser *)calendarChooser; - (void)calendarChooserDidCancel:(EKCalendarChooser *)calendarChooser; @end NS_ASSUME_NONNULL_END