Inherits from NSObject
Conforms to IGCalendarAppointmentDataSource
Declared in IGCalendarEKDataSourceHelper.h

Overview

The IGCalendarEKDataSourceHelper is basically just what it sounds like. If you’d like to display your iOS devices calendars, this class can handle that for you.

You simply provide an reference to the EKEventStore the calendar came from and EKCalendar that you want to display.

You can even change the color of the calendar if you don’t want to use the color from the EKCalendar.

If you don’t want to display the calendar tempoaritly, just set the hide property to YES and call invalidate on the IGCalendarView.

You can even look up the EKEvent that a particular IGCalendarAppointment represents.

Properties

color

The UIColor that should be used to represent appointments from this calendar. If not specified, it simply uses the color from the EKCalendar

@property (nonatomic, retain) UIColor *color

Declared In

IGCalendarEKDataSourceHelper.h

hide

Whehter or not to hide this calendar from the IGCalendarView. If set to hide, no appointments will appear for this dataSource

@property (nonatomic, assign) BOOL hide

Declared In

IGCalendarEKDataSourceHelper.h

title

The title of the Calendar. If not specified, it simply uses the color from the EKCalendar

@property (nonatomic, retain) NSString *title

Declared In

IGCalendarEKDataSourceHelper.h

Class Methods

createDatasourcesForAllDeviceCalendars

Helper method: Asks for permission to access the device’s calendar, and creates a IGCalendarEKDataSourceHelper for each one it finds.

+ (NSArray *)createDatasourcesForAllDeviceCalendars

Return Value

An array of IGCalendarEKDataSourceHelper objects for each EKCalendar it finds.

Declared In

IGCalendarEKDataSourceHelper.h

Instance Methods

initWithCalendar:forStore:

Creates an IGCalendarEKDataSourceHelper with the given calendar.

- (instancetype)initWithCalendar:(EKCalendar *)calendar forStore:(EKEventStore *)store

Parameters

calendar

An EKCalendar object.

store

An EKEventStore object. The object is stored weakly, so it’s up to you to keep a reference to it.

Return Value

Returns an initialized IGCalendarEKDataSourceHelper object or nil if the object could not be successfully initialized.

Declared In

IGCalendarEKDataSourceHelper.h

resolveEventFromAppointment:

Resolves the EKEvent that an IGCalendarAppointment represents.

- (EKEvent *)resolveEventFromAppointment:(IGCalendarAppointment *)appt

Parameters

appt

An IGCalendarAppointment that came from this IGCalendarEKDataSourceHelper

Return Value

Returns the backing EKEvent that this appointment represents.

Declared In

IGCalendarEKDataSourceHelper.h