我在我的应用程序中使用TapkuMonthCalendarViewController,当日历加载时,日历的配色方案在模拟器上看起来不正常。还有谁有过这样的经历?
我没有尝试设置任何东西的背景,我以前在其他应用程序中使用过这个日历,它从来没有像这样运行过。
任何建议都将不胜感激。
这是我看到的日历视图http://i.imgur.com/IwT9s.png
编辑:我意识到我忘记在我的项目中包含这个包了!因此,这是所有未来tapku用户的解决方案。
发布于 2012-08-04 13:33:14
您可以更改日历背景,而不是更改日历磁贴图像。
或者你把这段代码放在drawRect方法上。
- (void) drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
//UIImage *tile = [UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Date Tile.png")];
CGRect r = CGRectMake(0, 0, 46, 44);
//CGContextDrawTiledImage(context, r, tile.CGImage);
if(today > 0){
int pre = firstOfPrev > 0 ? lastOfPrev - firstOfPrev + 1 : 0;
int index = today + pre-1;
CGRect r =[self rectForCellAtIndex:index];
r.origin.y -= 7;
//[[UIImage imageWithContentsOfFile:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/Month Calendar Today Tile.png")] drawInRect:r];
}
}https://stackoverflow.com/questions/11270025
复制相似问题