【问题标题】:tapku calendar colorTapku 日历颜色
【发布时间】:2012-08-04 13:33:14
【问题描述】:

我在我的应用程序中使用 TapkuMonthCalendarViewController,当日历加载时,日历的配色方案在模拟器上显示不正常。其他人有过这种经历吗?

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

任何建议将不胜感激。

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

编辑:我意识到我忘记将捆绑包包含到我的项目中!所以这是所有未来tapku用户的解决方案。

【问题讨论】:

  • 这发生在我身上:我忘记将包包含到我的项目中。巧合的是,它在模拟器中看起来不错;它看起来与您在设备上的屏幕截图相同。

标签: colors calendar ios-simulator tapku


【解决方案1】:

您更改日历背景比更改日历图块图像。

或者你把这段代码放在 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];
    }
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多