Inherits from TKCalendarCell : UIView
Declared in TKCalendarDayCell.h

Overview

A calendar cell used to present dates in TKCalendar.

Properties

date

Returns the date represented by this cell.

@property (nonatomic, strong, readonly) NSDate *date

Declared In

TKCalendarDayCell.h

events

Returns an array containing all events for this cell.

@property (nonatomic, strong, readonly) NSArray *events

Declared In

TKCalendarDayCell.h

state

  • The cell state.
  • @discussion The available cell states are specified below:
@property (nonatomic) TKCalendarDayState state

Discussion

typedef enum TKCalendarDayState { TKCalendarDayStateToday // The date is today TKCalendarDayStateWeekend // The date represents a weekend. TKCalendarDayStateCurrentMonth // The date is contained within the currently presented month. TKCalendarDayStateCurrentYear // The date is contained within the currently presented year. TKCalendarDayStateSelected // The date is selected. TKCalendarDayStateFirstInSelection // The date is the first date in a range selection. TKCalendarDayStateLastInSelection // The date is the last date in a range selection. TKCalendarDayStateMidInSelection // The date is a mid date in a range selection. TKCalendarDayStateDisabled // The date is outside of the selectable range and cannot be selected } TKCalendarDayState

Declared In

TKCalendarDayCell.h

Instance Methods

attachWithCalendar:withDate:

Attaches a date and owner to the cell.

- (void)attachWithCalendar:(TKCalendar *__nonnull)owner withDate:(NSDate *__nonnull)date

Parameters

owner

The owner for this cell, an instance of TKCalendar.

date

The date that will be presented by this cell.

Declared In

TKCalendarDayCell.h

drawEvents:rect:

Called to draw the events specific for this cell.

- (void)drawEvents:(CGContextRef __nonnull)context rect:(CGRect)rect

Parameters

context

The graphics context to use when drawing events.

rect

The rectangle to draw.

Declared In

TKCalendarDayCell.h

stateForDate:

Returns the state based on the specified date.

- (TKCalendarDayState)stateForDate:(NSDate *__nonnull)date

Parameters

date

The date which state is requested.

Declared In

TKCalendarDayCell.h

style

Returns the cell style. Use the style property to customize the visual appearance of TKCalendarCell.

- (TKCalendarDayCellStyle *__nonnull)style

Declared In

TKCalendarDayCell.h

textAttributesForEvent:

Returns the text attributes for the specified event.

- (NSDictionary *__nullable)textAttributesForEvent:(id<TKCalendarEventProtocol> __nonnull)event

Parameters

event

The event which attributes are requested.

Declared In

TKCalendarDayCell.h

textForEvent:

Returns the text that should be displayed for the specified event.

- (NSString *__nullable)textForEvent:(id<TKCalendarEventProtocol> __nonnull)event

Parameters

event

The event which text is requested.

Declared In

TKCalendarDayCell.h