0

我使用Klazuka/Kal控制器来选择日期。是否可以在今天之前禁用日期?我也想用不同的颜色制作更早的日期。

4

2 回答 2

0

更改所选日期的颜色

转到 --> KalTileView.h 文件

在 - (void)drawRect:(CGRect)rect 方法

 [[[UIImage imageNamed:@"Kal.bundle/kal_tile_today_selected.png"] stretchableImageWithLeftCapWidth:6 topCapHeight:0] drawInRect:CGRectMake(0, -1, kTileSize.width+1, kTileSize.height+1)];      // change your image name and put your mentioned image to Kal.bundle package
textColor = [UIColor whiteColor];

解决

于 2012-07-03T07:56:56.680 回答
0

转到KalGridView.m并用下面给出的代码替换-(void)setSelectedTile:(KalTileView *)tile

- (void)setSelectedTile:(KalTileView *)tile
{
    if (selectedTile != tile && [[KalDate dateFromNSDate:[NSDate date]] compare:tile.date] != NSOrderedDescending)
    {
        selectedTile.selected = 否;
        selectedTile = [瓷砖保留];
        tile.selected = YES;
        [委托didSelectDate:tile.date];
    }
}

现在所有在当前日期之前的日期都将被禁用。

于 2013-07-16T10:17:01.283 回答