我使用 KALViewcontroller API 在我的 iPhone 应用程序中显示日历。我想保存最后选择的日期,并在日历再次出现时将其显示为“突出显示”。目前它显示今天的日期。
在KALViewController.m中,一个函数-(void)showAndSelectToday负责显示今天的日期并突出显示今天的图块。
[[self calendarView] selectTodayIfVisible];
//where *calendarView* is
- (KalView*)calendarView
{
checkDateConf = TRUE;
checkDate = FALSE;
return (KalView*)self.view;
}
在KalView.m 中
[gridView selectTodayIfVisible];
//其中gridView是KalGridView gridView;
在KALGridView.m 中
声明了 selectTodayIfVisible
- (void)selectTodayIfVisible
{
KalTileView *todayTile = [frontMonthView todaysTileIfVisible];
if (todayTile)
self.selectedTile = todayTile;
}
请指导我如何突出显示选定的日期。