TSQCalendarRowCell Class Reference
| Inherits from | TSQCalendarCell : UITableViewCell |
| Declared in | TSQCalendarRowCell.h TSQCalendarRowCell.m |
Overview
The TSQCalendarRowCell class is a cell that represents one week in the calendar.
Each of the seven columns can represent a day that’s in this month, a day that’s not in this month, a selected day, today, or an unselected day. The cell uses several images placed strategically to achieve the effect.
Tasks
Images
-
backgroundImageproperty -
selectedBackgroundImageproperty -
todayBackgroundImageproperty -
notThisMonthBackgroundImageproperty
State Properties Set by Calendar View
-
beginningDateproperty -
bottomRowproperty -
– selectColumnForDate:
Other Methods
Properties
backgroundImage
The background image for the entire row.
@property (nonatomic, weak, readonly) UIImage *backgroundImageDiscussion
This image should be as wide as the entire view and include the grid lines between the columns. It will probably also include the grid line at the top of the row, but not the one at the bottom.
You might, however, return a different image that includes both the grid line at the top and the one at the bottom if the bottomRow property is set to YES. You might even adjust the cellHeight.
Declared In
TSQCalendarRowCell.hbeginningDate
The date at the beginning of the week for this cell.
@property (nonatomic, strong) NSDate *beginningDateDiscussion
Notice that it might be before the firstOfMonth property or it might be after.
Declared In
TSQCalendarRowCell.hbottomRow
Whether this cell is the bottom row / last week for the month.
@property (nonatomic, getter=isBottomRow) BOOL bottomRowDiscussion
You may find yourself using a different background image or laying out differently in the last row.
Declared In
TSQCalendarRowCell.hnotThisMonthBackgroundImage
The background image for a day that’s not this month.
@property (nonatomic, weak, readonly) UIImage *notThisMonthBackgroundImageDiscussion
These are the trailing days from the previous month or the leading days from the following month. This can be nil.
Declared In
TSQCalendarRowCell.hInstance Methods
initWithCalendar:reuseIdentifier:
Initializes the cell.
- (id)initWithCalendar:(NSCalendar *)calendar reuseIdentifier:(NSString *)reuseIdentifierParameters
- calendar
The
NSCalendarthe cell is representing
- reuseIdentifier
A string reuse identifier, as used by
UITableViewCell
Declared In
TSQCalendarCell.hlayoutViewsForColumnAtIndex:inRect:
- (void)layoutViewsForColumnAtIndex:(NSUInteger)index inRect:(CGRect)rectDeclared In
TSQCalendarCell.hselectColumnForDate:
Method to select a specific date within the week.
- (void)selectColumnForDate:(NSDate *)dateParameters
- date
The date to select, or nil to deselect all columns.
Discussion
This is funneled through and called by the calendar view, to facilitate deselection of other rows.
Declared In
TSQCalendarRowCell.h