gpt4 book ai didi

ios - Fscalendar 选择的事件点颜色?

转载 作者:行者123 更新时间:2023-11-29 11:51:21 26 4
gpt4 key购买 nike

我正在使用 FSCalendar为我的申请。谁能告诉我怎么做仅为选定的事件设置不同的点颜色?

最佳答案

你必须设置数据源和日历的委托(delegate)

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];

}

关于ios - Fscalendar 选择的事件点颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41013376/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com