TKCalendarDayViewEventsView Class Reference
Inherits from | UICollectionView |
Declared in | TKCalendarDayViewEventsView.h |
Overview
Custom collection view that displays day events in TKCalendarDayView. The class should be initialized with TKCalendarDayViewEventsLayout that implements the logic required to arrange the events on a time line.
Tasks
-
events
property -
date
property -
calendar
property -
style
property -
zoom
property -
startTime
property -
endTime
property -
interval
property -
allowZoom
property -
minZoom
property -
maxZoom
property -
– attachWithEvents:forDate:withCalendar:
-
– labelForTimeInterval:
-
– offsetForComponents:
-
– offsetForHour:minute:second:
-
– timeLineHeight
-
– slotsCount
-
– labelSize
-
– labels
-
– updateLayout
Properties
allowZoom
Specifies whether the time line can be zoomed.
@property (nonatomic) bool allowZoom
Declared In
TKCalendarDayViewEventsView.h
calendar
The calendar.
@property (nonatomic, weak, readonly, nullable) NSCalendar *calendar
Declared In
TKCalendarDayViewEventsView.h
date
The displayed date.
@property (nonatomic, weak, readonly, nullable) NSDate *date
Declared In
TKCalendarDayViewEventsView.h
endTime
The end time of the time line in seconds.
@property (nonatomic) NSTimeInterval endTime
Declared In
TKCalendarDayViewEventsView.h
events
The displayed events.
@property (nonatomic, weak, readonly, nullable) NSArray<id<TKCalendarEventProtocol> > *events
Declared In
TKCalendarDayViewEventsView.h
interval
The time distance between separators in seconds.
@property (nonatomic) NSTimeInterval interval
Declared In
TKCalendarDayViewEventsView.h
maxZoom
The maximum zoom factor of the time line.
@property (nonatomic) CGFloat maxZoom
Declared In
TKCalendarDayViewEventsView.h
minZoom
The minimum zoom factor of the time line.
@property (nonatomic) CGFloat minZoom
Declared In
TKCalendarDayViewEventsView.h
startTime
The start time of the time line in seconds.
@property (nonatomic) NSTimeInterval startTime
Declared In
TKCalendarDayViewEventsView.h
Instance Methods
attachWithEvents:forDate:withCalendar:
Updates the displayed events data.
- (void)attachWithEvents:(NSArray<id<TKCalendarEventProtocol> > *__nullable)events forDate:(NSDate *__nullable)date withCalendar:(NSCalendar *__nonnull)calendar
Parameters
- events
The all-day events that will be displayed in the eventsView.
- date
The displayed date.
- calendar
The calendar.
Declared In
TKCalendarDayViewEventsView.h
labelForTimeInterval:
Returns the label text for specific time interval.
- (NSString *__nonnull)labelForTimeInterval:(NSTimeInterval)interval
Parameters
- interval
The time interval in seconds that correspond to the time of the day.
Return Value
The label.
Declared In
TKCalendarDayViewEventsView.h
labelSize
Returns the size of the time line labels.
- (CGSize)labelSize
Declared In
TKCalendarDayViewEventsView.h
labels
Returns collection of all time line labels.
- (NSArray<NSAttributedString*> *__nonnull)labels
Declared In
TKCalendarDayViewEventsView.h
offsetForComponents:
Returns the offset for the specified date components. The offset is between 0 and 1.
- (CGFloat)offsetForComponents:(NSDateComponents *__nonnull)components
Parameters
- components
The date components used to provide information about the time of the day.
Return Value
The offset.
Declared In
TKCalendarDayViewEventsView.h
offsetForHour:minute:second:
Returns the offset for the specified time. The offset is between 0 and 1.
- (CGFloat)offsetForHour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second
Parameters
- hour
The hour of the day.
- minute
The munite of the day.
- second
The second of the day.
Return Value
The offset.
Declared In
TKCalendarDayViewEventsView.h
slotsCount
Returns the number of time slots.
- (CGFloat)slotsCount
Declared In
TKCalendarDayViewEventsView.h
timeLineHeight
Calculates the height of the time line. This is not the height of the scrollable content.
- (CGFloat)timeLineHeight
Declared In
TKCalendarDayViewEventsView.h
updateLayout
Call this method to apply any changes in the view style or settings.
- (void)updateLayout
Declared In
TKCalendarDayViewEventsView.h