1

我在下面附上tapku日历图片

我尝试使用以下代码。但图像未设置。

TKCalendarMonthView *calendar = [[TKCalendarMonthView alloc] init];

calendar.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"fishimage.png"]];

“提前致谢”

4

2 回答 2

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 !

}
于 2013-01-11T13:08:27.387 回答
3

无需更改任何编码只需替换图像

转到 TapkuLibrary.bundle --> 图片 --> 日历并将您的图片替换为“月历日期 Tile.png”

或者

更改 TKCalendarMonthView.m 中的代码

tileImage = [UIImage imageNamed:@"fishimage.png"];

tileImage = [UIImage imageWithContentsOfFile:TKBUNDLE(@"calendar/Month Calendar Date Tile.png")];
于 2013-11-16T09:56:22.047 回答