Conforms to NSObject
Declared in IGCalendarView.h

Overview

The delegate of a IGCalendarView object must adopt the IGCalendarViewDelegate protocol. Optional methods of the protocol allow the delegate to manage navigation and interactions within the IGCalendarView.

Instance Methods

calView:appointments:loadedForMonthViewDayCustomView:

Tells the delegate that appointments are avaialble for a partiular day in the month view display. Use this method to display appointments in your custom view.

- (void)calView:(IGCalendarView *)calView appointments:(NSArray *)appts loadedForMonthViewDayCustomView:(UIView *)customView

Parameters

calView

The IGCalendarView making the request.

appts

The appointments for a specific day.

customView

The custom view provided in calView:monthViewDayCustomViewFor:day:year:

Discussion

If you implemented the calView:monthViewDayCustomViewFor:day:year: this method will notify you of the appointments for that day.

Declared In

IGCalendarView.h

calView:monthViewDayBackgroundColorFor:day:year:

Asks the delegate for the background color of a month view’s particular day.

- (UIColor *)calView:(IGCalendarView *)calView monthViewDayBackgroundColorFor:(NSInteger)month day:(NSInteger)day year:(NSInteger)year

Parameters

calView

The IGCalendarView making the request.

month

The month.

day

The day of the current month.

year

The year of the month.

Return Value

The color that will be used as the background color of the particular day.

Declared In

IGCalendarView.h

calView:monthViewDayBackgroundColorForEmptyDay:year:

Asks the delegate for the background color of a month’s empty day.

- (UIColor *)calView:(IGCalendarView *)calView monthViewDayBackgroundColorForEmptyDay:(NSInteger)month year:(NSInteger)year

Parameters

calView

The IGCalendarView making the request.

month

The month.

year

The year of the month.

Return Value

The color that will be used as the background color of the particular day.

Discussion

This will be called for each empty day within the month.

Declared In

IGCalendarView.h

calView:monthViewDayCustomViewFor:day:year:

Asks the delegate for a view that will be displayed for a particular day in the month view display.

- (UIView *)calView:(IGCalendarView *)calView monthViewDayCustomViewFor:(NSInteger)month day:(NSInteger)day year:(NSInteger)year

Parameters

calView

The IGCalendarView making the request.

month

The month.

day

The day of the current month.

year

The year of the month.

Return Value

The view that will be dispalyed in the day area.

Discussion

If you use this delegate, appointments will no longer be displayed automatically. You’ll take on the responsibility to display them. If you return nil, then we will display the day like normal.

Declared In

IGCalendarView.h

calendarView:appointmentTapped:fromDataSource:withBounds:forDay:

Tells the delegate that an IGCalendarAppointment was tapped in the IGCalendarViewDisplayTypeDay view.

- (void)calendarView:(IGCalendarView *)calView appointmentTapped:(IGCalendarAppointment *)appt fromDataSource:(id<IGCalendarAppointmentDataSource>)dataSource withBounds:(CGRect)rect forDay:(NSDate *)date

Parameters

calView

The IGCalendarView providing the information.

appt

The appointment that was tapped.

dataSource

The dataSource that provided the appointment.

rect

The actual bounds of the appointment that was tapped.

date

The date in which the appointment was tapped on.

Declared In

IGCalendarView.h

calendarView:dayChanged:

Tells the delegate that IGCalendarView has navigated to a different day.

- (void)calendarView:(IGCalendarView *)calView dayChanged:(NSDate *)date

Parameters

calView

The IGCalendarView providing the information.

date

The current date of the IGCalendarView

Declared In

IGCalendarView.h

calendarView:monthChanged:

Tells the delegate that IGCalendarView has navigated to a different month.

- (void)calendarView:(IGCalendarView *)calView monthChanged:(NSDate *)date

Parameters

calView

The IGCalendarView providing the information.

date

The current date of the IGCalendarView

Declared In

IGCalendarView.h

calendarView:monthViewDayTapped:

Tells the delegate that a monthView’s day was tapped.

- (BOOL)calendarView:(IGCalendarView *)calView monthViewDayTapped:(NSDate *)date

Parameters

calView

The IGCalendarView providing the information.

date

The actual date being tapped.

Return Value

YES if you want to allow normal navigation, NO if you want to cancel navigation and perform your own task.

Discussion

Return YES if you want the calendarView to navigate to that day.

Declared In

IGCalendarView.h

calendarView:rightTitleBarButtonTappedFor:

Tells the delegate that the rightTitleBarButton has been clicked.

- (void)calendarView:(IGCalendarView *)calView rightTitleBarButtonTappedFor:(IGCalendarViewDisplayType)displayType

Parameters

calView

The IGCalendarView providing the information.

displayType

The IGCalendarViewDisplayType currently being displayed.

Declared In

IGCalendarView.h

calendarView:titleForBackButtonForDate:forDisplayType:

Asks the delegate for the title of a the back title bar button.

- (NSString *)calendarView:(IGCalendarView *)calView titleForBackButtonForDate:(NSDate *)date forDisplayType:(IGCalendarViewDisplayType)displayType

Parameters

calView

The IGCalendarView making the request.

date

The date that needs to be represented.

displayType

The IGCalendarViewDisplayType currently being displayed.

Return Value

The value of the title bar’s back button to be displayed or nil.

Discussion

Return nil if the calendarView should use the default. This method is invoked each type the currentDisplay of the IGCalendarView changes.

Declared In

IGCalendarView.h

calendarView:titleForMonthViewMoreAppointmentsLabel:notShownCount:

Asks the delegate for the title of the month view’s # more… label, that is displayed when there isn’t enough space to display all of the appointments in a month view day.

- (NSString *)calendarView:(IGCalendarView *)calView titleForMonthViewMoreAppointmentsLabel:(NSArray *)appts notShownCount:(NSInteger)notShownCount

Parameters

calView

The IGCalendarView making the request.

appts

An array of IGCalendarAppointment objects that belong to the day of the month thats requesting the string.

notShownCount

The number of appoitnments that can’t fit into the day’s cell.

Return Value

The text that will be displayed in the extra appointments' label.

Discussion

Return nil if the calendarView should use the default.

Declared In

IGCalendarView.h

calendarView:titleForRightTitleBarButtonFor:

Asks the delegate for the title of a the rightTitleBarButton.

- (NSString *)calendarView:(IGCalendarView *)calView titleForRightTitleBarButtonFor:(IGCalendarViewDisplayType)displayType

Parameters

calView

The IGCalendarView making the request.

displayType

The IGCalendarViewDisplayType currently being displayed.

Return Value

The title of the button to be displayed or nil.

Discussion

Return nill if there shouldn’t be a button displayed. This method is invoked each type the currentDisplay of the IGCalendarView changes.

Declared In

IGCalendarView.h

calendarView:titleLabelForDate:forDisplayType:

Asks the delegate for the title of a the title bar.

- (NSString *)calendarView:(IGCalendarView *)calView titleLabelForDate:(NSDate *)date forDisplayType:(IGCalendarViewDisplayType)displayType

Parameters

calView

The IGCalendarView making the request.

date

The date that needs to be represented.

displayType

The IGCalendarViewDisplayType currently being displayed.

Return Value

The value of the title bar to be displayed or nil.

Discussion

Return nil if the calendarView should use the default. This method is invoked each type the currentDisplay of the IGCalendarView changes.

Declared In

IGCalendarView.h

calendarView:yearChanged:

Tells the delegate that IGCalendarView has navigated to a different year.

- (void)calendarView:(IGCalendarView *)calView yearChanged:(NSDate *)date

Parameters

calView

The IGCalendarView providing the information.

date

The current date of the IGCalendarView

Declared In

IGCalendarView.h

calendarView:yearViewMonthTapped:

Tells the delegate that a yearView’s month was tapped.

- (BOOL)calendarView:(IGCalendarView *)calView yearViewMonthTapped:(NSDate *)date

Parameters

calView

The IGCalendarView providing the information.

date

The actual date being tapped.

Return Value

YES if you want to allow normal navigation, NO if you want to cancel navigation and perform your own task.

Discussion

Return YES if you want the calendarView to navigate to that month.

Declared In

IGCalendarView.h