4
喜標記的日期選擇的圖像,我已經通過網絡和許多博客走了,但似乎有關於如何改變tapku日曆control.I的標註日期的圖像沒有做過信息一些關於代碼的研究卻無法完成目標。改變對Tapku日曆
寫信跟我能更改日期瓦的backgournd圖像。但當我這樣做的日期文本消失的任何想法?
我已經改變了圖像上的TKmonthView.m
文件的方法
- (void) drawTileInRect:(CGRect)r day:(int)day mark:(BOOL)mark font:(UIFont*)f1 font2:(UIFont*)f2 method
請我需要一些幫助這裏是我的代碼
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];
}
貌似傢伙沒有人願意談論它。但我想我已經到了一個solution.The運行的代碼我的應用程序看起來像this.It只是需要一些測試,也爲標註日期的選擇我需要一些solution.I會考慮它。我的解決方案如下
- (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;
// self.selectedImageView=[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile Gray.png")];
r.origin.y +=6;
r.size.height = 10;
r.origin.y += 18;
[@"•" drawInRect: r
withFont: f2
lineBreakMode: UILineBreakModeWordWrap
alignment: UITextAlignmentCenter];
}
}