Hi, I went through the Internet and many blogs. But there seems to be no information on how to change the image of the marked tapku calendar management date. I did some code research, but could not complete the goal.
Write now, I was able to reverse the image of the date tile. But when I do this, the text for the date goes away any ideas?
I changed the image in the TKmonthView.m
file on the method
- (void) drawTileInRect:(CGRect)r day:(int)day mark:(BOOL)mark font:(UIFont*)f1 font2:(UIFont*)f2 method
i need help here is my code
if(mark){ r.origin.y-=5; [[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Gray.png")] drawInRect:r]; r.size.height = 10; r.origin.y += 18; [@"โข" drawInRect: r withFont: f2 lineBreakMode: UILineBreakModeWordWrap alignment: UITextAlignmentCenter]; }
Guys don't seem to want to talk about this. But I think I have come to a decision. The working code for my application looks like this. I just need some testing, and also to select a marked date I need some solution. I will review it. My solution is as follows
- (void) drawTileInRect:(CGRect)r day:(int)day mark:(BOOL)mark font:(UIFont*)f1 font2:(UIFont*)f2{ if (mark) { r.origin.y-=6.5; [[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Gray.png")] drawInRect:r]; r.origin.y+=6.5; } NSString *str = [NSString stringWithFormat:@"%d",day]; r.size.height -= 2; [str drawInRect: r withFont: f1 lineBreakMode: UILineBreakModeWordWrap alignment: UITextAlignmentCenter]; if(mark){ r.origin.y-=6;
source share