Inherits from UITableViewCell
Declared in TSQCalendarCell.h
TSQCalendarCell.m

Overview

The TSQCalendarCell class is an abstract superclass to the two cell types used for display in a TSQCalendarView.

Most of its interface deals with display properties. The most interesting method is layoutViewsForColumnAtIndex:inRect:, which is a simple way of handling seven columns.

Tasks

State Properties Set by Calendar View

Display Properties

Initialization

Properties

calendar

The calendar type we’re displaying.

@property (nonatomic, strong) NSCalendar *calendar

Discussion

This is whatever the owning TSQCalendarView’s calendar property is set to; it’s likely [NSCalendar currentCalendar].

Declared In

TSQCalendarCell.h

calendarView

The owning calendar view.

@property (nonatomic, weak) TSQCalendarView *calendarView

Discussion

This is a weak reference.

Declared In

TSQCalendarCell.h

columnSpacing

The spacing between columns.

@property (nonatomic) CGFloat columnSpacing

Discussion

This defaults to one pixel or 1.0 / [UIScreen mainScreen].scale.

Declared In

TSQCalendarCell.h

daysInWeek

How many days there are in a week.

@property (nonatomic, readonly) NSUInteger daysInWeek

Discussion

This is usually 7.

Declared In

TSQCalendarCell.h

firstOfMonth

The first day of the month this cell is currently representing.

@property (nonatomic, strong) NSDate *firstOfMonth

Discussion

This can be useful for calculations and for display.

Declared In

TSQCalendarCell.h

shadowOffset

The text shadow offset.

@property (nonatomic) CGSize shadowOffset

Discussion

This is as you would set on UILabel.

Declared In

TSQCalendarCell.h

textColor

The text color.

@property (nonatomic, strong) UIColor *textColor

Discussion

This is used for all text the cell draws; if a date is disabled, then it will draw in this color, but at 50% opacity.

Declared In

TSQCalendarCell.h

Class Methods

cellHeight

The preferred height for instances of this cell.

+ (CGFloat)cellHeight

Discussion

The built-in implementation in TSQCalendarCell returns 46.0f. Your subclass may want to return another value.

Declared In

TSQCalendarCell.h

Instance Methods

initWithCalendar:reuseIdentifier:

Initializes the cell.

- (id)initWithCalendar:(NSCalendar *)calendar reuseIdentifier:(NSString *)reuseIdentifier

Parameters

calendar

The NSCalendar the cell is representing

reuseIdentifier

A string reuse identifier, as used by UITableViewCell

Declared In

TSQCalendarCell.h

layoutViewsForColumnAtIndex:inRect:

- (void)layoutViewsForColumnAtIndex:(NSUInteger)index inRect:(CGRect)rect

Declared In

TSQCalendarCell.h