Fscalenar选择了事件点颜色?

时间:2016-12-07 09:11:44

标签: ios objective-c iphone fscalendar

我正在使用FSCalendar申请。任何人都可以告诉我如何 仅为所选事件设置不同的点颜色?

1 个答案:

答案 0 :(得分:1)

您必须设置dataSource和日历委托

calendar.dataSource = self;
calendar.delegate = self;

- (NSInteger)calendar:(FSCalendar *)calendar numberOfEventsForDate:(NSDate *)date 
{
    return 4;// Return how many dot to show below date
}


- (NSArray *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorsForDate:(NSDate *)date
{

    return @[[UIColor magentaColor],appearance.eventColor,[UIColor blackColor],appearance.eventColor];

}