选择颜色更改FSCalendar中的事件颜色 [英] Selection color changes the events color in FSCalendar

查看:477
本文介绍了选择颜色更改FSCalendar中的事件颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Swift 4中有一个使用FSCalendar的项目.我有绿色和红色的事件.但是,在选择特定日期时,事件的颜色变为选择颜色.我如何解决此问题,如下图所示.蓝色选择颜色上的事件点必须为绿色或红色.

I have a project using FSCalendar in swift 4. I have events as green and red color. But while selecting the particular dates , the color of events changes to selection color. How can I solve this issue as given in image below. The event dots on the blue selection color must come either green or red.

对于图像,您可以看到此链接: https://github.com/WenchaoD/FSCalendar /issues/919

For image you can see this link : https://github.com/WenchaoD/FSCalendar/issues/919

推荐答案

我认为您尚未设置FSCalendar的 eventSelectionColor 属性.

I think you have not set the eventSelectionColor Property of FSCalendar.

您可以使用以下代码以编程方式进行设置.

You can set it programmatically by using below code.

calendar.appearance.eventSelectionColor = UIColor.green

您可以在故事板"中的属性"检查器字段中对其进行设置.如下图所示,设置FSCalendar的事件选择颜色属性.

You can set it from storyboard in Attributes inspector field.Set the event selection color property of FSCalendar as shown in below image.

希望这会对您有所帮助.

Hope this will help you.

这篇关于选择颜色更改FSCalendar中的事件颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆