kal日历更改标记事件颜色



我使用Klazuka/Kal控制器来选择日期。当我从两个不同的数组添加事件时。so

基本上我有两个数组,其中有不同的日期。所以,我想区分这两种

数组在日历中显示为事件的日期。

请建议一些摆脱困境的方法。谢谢

CGColor是EKCalendar的一个属性。EKEvents没有可设置颜色的属性。特定日历中的所有事件都将具有相同的颜色。

您可以为色差创建不同的日历

    EKEventStore *eventStore = [[EKEventStore alloc] init];
    EKCalendar *calendar = [EKCalendar calendarWithEventStore:eventStore];
    calendar.title = calendarName; // set calendar name
    calendar.CGColor = [UIColor grayColor].CGColor // set whichever color you want here
    bool success= [eventStore saveCalendar:calendar commit:YES error:&error];

请参阅此

最新更新