Conforms to NSObject
Declared in IGCalendarView.h

Overview

The IGCalendarAppointmentDataSource protocol is adopted by an object that mediates the application’s appointment data model for a IGCalendarView object. The data source provides the calendar view object with the IGCalendarAppointment objects that get displayed in it’s various views.

The only required method of this protocol is the color that the appointments provided by this datasource should use.

Instance Methods

calendarView:appointmentsForStart:end:ofType:

Asks the datasource for an Array of IGCalendarView appointments.

- (NSArray *)calendarView:(IGCalendarView *)calView appointmentsForStart:(NSDate *)start end:(NSDate *)end ofType:(IGCalendarAppointmentRequestType)requestType

Parameters

calView

The IGCalendarView making the request.

start

The beginning of the appointment range being requested by the IGCalendarView.

end

The end of the appointment range being requested by the IGCalendarView

requestType

The view making the request: Day or Month

Return Value

An array of IGCalendar appointment objects or nil if there are no appointments to return.

Discussion

Although this method is synchrounous, it is actually called on a background thread to keep the calendar scrolling performance smooth.

Declared In

IGCalendarView.h

calendarView:asyncAppointmentRequest:ofType:

Asks the datasource for an Array of IGCalendarView appointments.

- (void)calendarView:(IGCalendarView *)calView asyncAppointmentRequest:(IGCalendarAppointmentRequest *)request ofType:(IGCalendarAppointmentRequestType)requestType

Parameters

calView

The IGCalendarView making the request.

request

The IGCalendarAppointmentRequest object that contains the date range being requested.

requestType

The view making the request: Day or Month

Discussion

Since this method is async, to return appointments called provideAppointments: from the IGCalendarAppointmentRequest object that was provided.

Declared In

IGCalendarView.h

colorForAppointmentsInIGCalendarView:

Asks the datasource for the color that appointments should appear as for this calendar.

- (UIColor *)colorForAppointmentsInIGCalendarView:(IGCalendarView *)calView

Parameters

calView

The IGCalendarView making the request.

Return Value

The UIColor to use.

Discussion

This is not optional

Declared In

IGCalendarView.h

colorForSelectedAppointmentTextInIGCalendarView:

Asks the datasource for the color that should be used for the text of selected appointments.

- (UIColor *)colorForSelectedAppointmentTextInIGCalendarView:(IGCalendarView *)calView

Parameters

calView

The IGCalendarView making the request.

Return Value

The UIColor to use.

Discussion

If not specified, white will be used.

Declared In

IGCalendarView.h