Inherits from TSQCalendarCell : UITableViewCell
Declared in TSQCalendarMonthHeaderCell.h
TSQCalendarMonthHeaderCell.m

Overview

The TSQCalendarMonthHeaderCell class displays the month name and day names at the top of a month’s worth of weeks.

By default, it lays out the day names in the bottom 20 points, the month name in the remainder of its height, and has a height of 65 points. You’ll want to subclass it to change any of those things.

Properties

headerLabels

The day header labels.

@property (nonatomic, strong) NSArray *headerLabels

Discussion

The count is equal to the daysInWeek property, likely seven. You can position them in the call to layoutViewsForColumnAtIndex:inRect:.

Declared In

TSQCalendarMonthHeaderCell.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

createHeaderLabels

Creates the header labels.

- (void)createHeaderLabels

Discussion

If you want the text in your header labels to be something other than the short day format (“Mon Tue Wed” etc.), override this method, call super, and loop through self.headerLabels, changing their text.

Declared In

TSQCalendarMonthHeaderCell.h

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

setFirstOfMonth:

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

- (void)setFirstOfMonth:(NSDate *)firstOfMonth

Discussion

This can be useful for calculations and for display.

Declared In

TSQCalendarCell.h