TKCalendarDayViewDataSource Protocol Reference
Conforms to | NSObject |
Declared in | TKCalendarDayView.h |
Overview
The TKCalendarDayViewDataSource protocol defines methods to create subviews in TKCalendarDayView.
Tasks
-
– dayView:numberOfEventsInSection:
required method -
– dayView:numberOfAllDayEventsInSection:
required method -
– dayView:eventCellForItemAtIndexPath:
required method -
– dayView:allDayEventCellForItemAtIndexPath:
required method -
– createAllDayEventsViewInDayView:
required method -
– createEventsViewInDayView:
required method -
– dayView:updateCell:
required method
Instance Methods
createAllDayEventsViewInDayView:
Returns a TKCalendarDayViewAllDayEventsView that will display all-day events.
- (TKCalendarDayViewAllDayEventsView *__nonnull)createAllDayEventsViewInDayView:(TKCalendarDayView *__nonnull)dayView
Parameters
- dayView
The parent TKCalendarDayView.
Return Value
The all-day events view.
Declared In
TKCalendarDayView.h
createEventsViewInDayView:
Returns TKCalendarDayViewEventsView that will display the events for this day that are not marked as all-day.
- (TKCalendarDayViewEventsView *__nonnull)createEventsViewInDayView:(TKCalendarDayView *__nonnull)dayView
Parameters
- dayView
The parent TKCalendarDayView.
Return Value
The events view.
Declared In
TKCalendarDayView.h
dayView:allDayEventCellForItemAtIndexPath:
Returns UICollectionViewCell cell that will represent an event in the TKCalendarDayViewAllDayEventsView
- (__kindof UICollectionViewCell *__nonnull)dayView:(TKCalendarDayView *__nonnull)dayView allDayEventCellForItemAtIndexPath:(NSIndexPath *__nonnull)indexPath
Parameters
- dayView
The dayView that contains the TKCalendarDayViewAllDayEventsView.
- indexPath
The NSIndexPath for the event inside the dayView.allDayEvents collection.
Return Value
The all-day event cell.
Declared In
TKCalendarDayView.h
dayView:eventCellForItemAtIndexPath:
Returns UICollectionViewCell cell that will represent an event in the TKCalendarDayViewEventsView
- (__kindof UICollectionViewCell *__nonnull)dayView:(TKCalendarDayView *__nonnull)dayView eventCellForItemAtIndexPath:(NSIndexPath *__nonnull)indexPath
Parameters
- dayView
The dayView that contains the TKCalendarDayViewEventsView.
- indexPath
The NSIndexPath for the event inside the dayView.events collection.
Return Value
The event cell.
Declared In
TKCalendarDayView.h
dayView:numberOfAllDayEventsInSection:
Returns the number of events marked as allDay. These events are used as a data source for the TKCalendarDayViewAllDayEventsView. By default the count of TKCalendar allDayEvents property is returned.
- (NSInteger)dayView:(TKCalendarDayView *__nonnull)dayView numberOfAllDayEventsInSection:(NSInteger)section
Parameters
- dayView
The dayView that contains the TKCalendarDayViewAllDayEventsView.
- section
The section.
Return Value
The number of all-day events.
Declared In
TKCalendarDayView.h
dayView:numberOfEventsInSection:
Returns the number of events that are not marked as allDay. These events are used as a source for the TKCalendarDayViewEventsView. By default the count of TKCalendarDayView events property is returned.
- (NSInteger)dayView:(TKCalendarDayView *__nonnull)dayView numberOfEventsInSection:(NSInteger)section
Return Value
The number of events.
Declared In
TKCalendarDayView.h