首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tapku日历颜色

tapku日历颜色
EN

Stack Overflow用户
提问于 2012-06-30 07:08:46
回答 1查看 701关注 0票数 1

我在我的应用程序中使用TapkuMonthCalendarViewController,当日历加载时,日历的配色方案在模拟器上看起来不正常。还有谁有过这样的经历?

我没有尝试设置任何东西的背景,我以前在其他应用程序中使用过这个日历,它从来没有像这样运行过。

任何建议都将不胜感激。

这是我看到的日历视图http://i.imgur.com/IwT9s.png

编辑:我意识到我忘记在我的项目中包含这个包了!因此,这是所有未来tapku用户的解决方案。

EN

回答 1

Stack Overflow用户

发布于 2012-08-04 13:33:14

您可以更改日历背景,而不是更改日历磁贴图像。

或者你把这段代码放在drawRect方法上。

代码语言:javascript
复制
- (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];
    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11270025

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档