IGCalendarView Class Reference

Inherits from UIView
Declared in IGCalendarView.h

Overview

The IGCalendarView is a container that displays different views for navigating dates and display appointments. Within in this control you can view 3 different display types Year, Month, and Day.

Each display type knows how to animate smoothly between other display types to prvoide a seamless transition.

You can use this control to display your own calendars/appointments.

  theme

Sets the IGCalendarThemeDefinition that will control the styling of particular elements of the IGCalendarView.

@property (nonatomic, weak, nullable) id<IGCalendarThemeDefinition> theme

Declared In

IGCalendarView.h

  delegate

The object that acts as the delegate of the calendar view.

@property (nonatomic, weak, nullable) id<IGCalendarViewDelegate> delegate

Discussion

The delegate must adopt the IGCalendarViewDelegate protocol.

Declared In

IGCalendarView.h

  strings

Sets the IGCalendarViewStringsDefinition that will control the default text values of particular elements of the IGCalendarView.

@property (nonatomic, weak, nullable) id<IGCalendarViewStringsDefinition> strings

Discussion

When setting this property, you should call the calendar’s invalidate method afterwards to ensure all elements are refreshed.

Declared In

IGCalendarView.h

  appointmentDataSources

An array of objects that each provides differen’t calendar appointments to the IGCalendarView.

@property (nonatomic, retain, nullable) NSArray<__kindofid<IGCalendarAppointmentDataSource> > *appointmentDataSources

Discussion

Each dataSource in the array must implement the IGCalendarAppointmentDataSource protocol.

Declared In

IGCalendarView.h

  maxYear

The maximum year the IGCalendarView should display. If the max year is hit, it will automatically loop around to the min year.

@property (nonatomic, assign) NSInteger maxYear

Declared In

IGCalendarView.h

  minYear

The minimum year the IGCalendarView should display. If the min year is hit, it will automatically loop around to the max year.

@property (nonatomic, assign) NSInteger minYear

Declared In

IGCalendarView.h

  displayBackButton

Determines if the navigate back button on the titleBar is displayed.

@property (nonatomic, assign) BOOL displayBackButton

Declared In

IGCalendarView.h

  displayTitleBar

Determines if the title bar on the IGCalendarView displayed.

@property (nonatomic, assign) BOOL displayTitleBar

Declared In

IGCalendarView.h

  localeIdentifier

Provies the locale used for the IGCalendarView.

@property (nonatomic, retain, nullable) NSString *localeIdentifier

Discussion

If not set the [NSCalendar current] is used.

Declared In

IGCalendarView.h

  rightTitleBarButton

Provides access to the UIButton used for the title bar on the right side (readOnly)

@property (nonatomic, readonly) UIButton *rightTitleBarButton

Discussion

This is provided so that if you wanted to display a popup, you have a refrence/bounds of where to display the popup to.

Declared In

IGCalendarView.h

  currentDate

Provides the currentDate of the IGCalendarView(readOnly)

@property (nonatomic, readonly) NSDate *currentDate

Discussion

IGCalendarDisplayTypeYear = 1/1/Year IGCalendarDisplayTypeMonth = Month/1/Year IGCalendarDisplayTypeDay = Month/Day/Year

To changed the date, use the navigateToDate:forType method.

Declared In

IGCalendarView.h

  calendarType

Provides the current IGCalendarViewDisplayType (readOnly)

@property (nonatomic, readonly) IGCalendarViewDisplayType calendarType

Discussion

To changed the displayType, use the navigateToDate:forType method.

Declared In

IGCalendarView.h

  monthViewDayClickAction

Determines whether clicking a MonthView’s day should navigate to a DayView or WeekView

@property (nonatomic, assign) IGCalendarMonthViewDayClickAction monthViewDayClickAction

Declared In

IGCalendarView.h

– navigateToDate:forType:

Navigates to the provided date in the specified view.

- (void)navigateToDate:(NSDate *)date forType:(IGCalendarViewDisplayType)calendarType

Discussion

The navigation will animate if possible. If not, it will simply snap to that view.

For example if you go from YearView to MonthView, If the current month is in view of YearView it will animate to the month. However, if you went from a YearView to a DayView, it will just snap.

Declared In

IGCalendarView.h

– navigateToDate:forType:animate:

Navigates to the provided date in the specified view.

- (void)navigateToDate:(NSDate *)date forType:(IGCalendarViewDisplayType)calendarType animate:(BOOL)animate

Discussion

If the animate flag is true navigation will animate if possible. If not, it will simply snap to that view.

For example if you go from YearView to MonthView, If the current month is in view of YearView it will animate to the month. However, if you went from a YearView to a DayView, it will just snap.

Declared In

IGCalendarView.h

– navigateBack

Navigates back to the next logical IGCalendarDisplayType

- (void)navigateBack

Discussion

If you’re on a Month it will go back to a Year If you’re on a Day it will go back to a Month If you’re on a Year it will do nothing.

Declared In

IGCalendarView.h

– invalidate

Causes the IGCalendarView to completely invalidate itself and reload the theme and any appointments getting displayed.

- (void)invalidate

Declared In

IGCalendarView.h

  dayViewInitialScrollLocation

When a DayView comes into view, this property determines if it should auto scroll to the first appointment in the day, or a specified start hour.

@property (nonatomic, assign) IGCalendarDayViewInitialScrollLocation dayViewInitialScrollLocation

Discussion

If there is no appointment available for a specific day and the value of this property is set to: IGCalendarDayViewInitialScrollLocationFirstAppointment it will fall back to the dayViewInitialScrollStartHour.

Declared In

IGCalendarView.h

  dayViewInitialScrollStartHour

Specifies the start hour that should be displayed when a DayView comes into view and the dayViewInitialScrollLocation property is set to IGCalendarDayViewInitialScrollLocationSpecificHour

@property (nonatomic, assign) CGFloat dayViewInitialScrollStartHour

Discussion

Values should range from 0 - 23 and the default is 0.

Declared In

IGCalendarView.h

  dayViewHourTimeFormat

Specifies whether the hours displayed in the dayView are displayed in 24 hour time, 12 hour time, or automatically determined by culture.

@property (nonatomic, assign) IGCalendarDayViewTimeFormat dayViewHourTimeFormat

Declared In

IGCalendarView.h

  dayViewShowAMPM

Specifies whether am/pm should be appended to the hours of the dayview when the dayViewHourTimeFormat is set to 12.

@property (nonatomic, assign) BOOL dayViewShowAMPM

Declared In

IGCalendarView.h

  dayViewWeekAreaVisible

Specifies whether the week area of a dayView is displayed.

@property (nonatomic, assign) BOOL dayViewWeekAreaVisible

Declared In

IGCalendarView.h

  startWorkingHour

Specifies the start hour for working for the dayView and weekViews views. A number between 0 and 23. Note, styleWorkingHours must be true for this to take affect.

@property (nonatomic, assign) CGFloat startWorkingHour

Declared In

IGCalendarView.h

  endWorkingHour

Specifies the end hour for working. A number between 0 and 23. Note, styleWorkingHours must be true for this to take affect.

@property (nonatomic, assign) CGFloat endWorkingHour

Declared In

IGCalendarView.h

  styleWorkingHours

For the dayView and weekView views a style will be applied for the startWorkingHour and endWorkingHour properites

@property (nonatomic, assign) BOOL styleWorkingHours

Declared In

IGCalendarView.h

  limitAllDayAreaHeight

Normally we will limit the all day area height to the size of 2.5 appts high, just like the iOS Calendar App. However, you can set this property to NO, and we will make it so that all allday appointments are visible.

@property (nonatomic, assign) BOOL limitAllDayAreaHeight

Declared In

IGCalendarView.h

  monthViewEmptyDaysRule

Specifies what empty days are allowed to appear for a Month in the Month view.

@property (nonatomic, assign) IGCalendarMonthViewEmptyDays monthViewEmptyDaysRule

Declared In

IGCalendarView.h

– resolveDateInMonthViewForPoint:

If the IGCalendarView is displaying the monthView, it will return the date at the specified point. Or nil, if there isn’t a date at that point.

- (NSDate *)resolveDateInMonthViewForPoint:(CGPoint)point

Discussion

If the IGCalendarView is not displaying a monthView it will always return nil;

Declared In

IGCalendarView.h

– resolveDateInYearViewForPoint:

If the IGCalendarView is displaying the yearView, it will return the date at the specified point. Or nil, if there isn’t a date at that point.

- (NSDate *)resolveDateInYearViewForPoint:(CGPoint)point

Discussion

If the IGCalendarView is not displaying a yearView it will always return nil; This method will not return the specific day, just the month and year.

Declared In

IGCalendarView.h

– resolvePositionOfTimeInDayView:

If the IGCalendarView is displaying the dayView or weekView, it will return the y location of the speicfied hour in 24 hour format..

- (CGFloat)resolvePositionOfTimeInDayView:(CGFloat)time

Discussion

If the IGCalendarView is not displaying a dayView or weekView, it will always return -1;

Declared In

IGCalendarView.h