!
我尝试使用下面的代码。但是没有设置图像。
TKCalendarMonthView *calendar = [[TKCalendarMonthView alloc] init];
calendar.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"fishimage.png"]];
“先谢谢”
答案 0 :(得分:4)
否由于是包含日期编号的(可能是)按钮/视图的集合,因此无法更改Tapku日历的整体图像。但您可以按照UIImage+TKCategory.m
类
+ (UIImage*) imageNamedTK:(NSString*)str{
CGFloat s = 1.0f;
if([[UIScreen mainScreen] respondsToSelector:@selector(scale)]){
s = [[UIScreen mainScreen] scale];
}
//NSString *path = [NSString stringWithFormat:@"%@%@.png",str,s > 1 ? @"@2x":@""];
return [UIImage imageWithCGImage:[[UIImage imageNamed:@"img.jpg"]CGImage] scale:s orientation:UIImageOrientationUp]; // put here specific image name for display !
}
答案 1 :(得分:3)
无需更改任何编码只需替换图像
goto TapkuLibrary.bundle - >图像 - >日历和 使用“Month Calendar Date Tile.png”替换您的图像
或强>
更改TKCalendarMonthView.m中的代码
tileImage = [UIImage imageNamed:@"fishimage.png"];
与
tileImage = [UIImage imageWithContentsOfFile:TKBUNDLE(@"calendar/Month Calendar Date Tile.png")];