你將不能夠改變的寬度在未對TKCalendarMonthViewController進行大量更改的情況下查看月(視圖)。例如,每個單獨的tile/day的寬度在 - (id)initWithSundayAsFirst方法中設置爲46。
int i = 0;
for(NSString *s in ar){
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(46 * i, 29, 46, 15)];
[self addSubview:label];
label.text = s;
label.textAlignment = UITextAlignmentCenter;
label.shadowColor = [UIColor whiteColor];
label.shadowOffset = CGSizeMake(0, 1);
label.font = [UIFont systemFontOfSize:11];
label.backgroundColor = [UIColor clearColor];
label.textColor = [UIColor colorWithRed:59/255. green:73/255. blue:88/255. alpha:1];
i++;
}
你會發現,圖像被用於爲個人瓷磚的背景在很多的方法,所以你需要創建適合您的自定義圖像的寬度。例如 - (void)reactToTouch:down包含:
self.selectedImageView.image = [UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Selected.png")];
來源
2012-07-23 15:37:11
Jon
檢查TKCalanderView類。有一些是防止改變寬度.. – iCreative 2012-07-21 05:19:43