TSQCalendarMonthHeaderCell Class Reference
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
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