用于设置我正在做的图像
func calendar(_ calendar: FSCalendar, imageFor date: Date) ->
UIImage? {
let day: Int! = self.gregorian.component(.day, from: date)
if day == 6 || day == 10{
return UIImage(named: "event_calender")
}else if day == 7 || day == 14{
return UIImage(named: "holiday_calender_line")
}
else if day == 7 || day == 14{
return UIImage(named: "birthday_calender_line")
}
else{
return [13,4].contains(day) ? UIImage(named: "icon_cat") : nil
}
}
但我如何从此委托方法更改选择日期图像
func calendar(_ calendar: FSCalendar, didSelect date: Date, at monthPosition: FSCalendarMonthPosition) {
print("calendar did select date \(self.formatter.string(from: date))")
}
说当前图片是“holiday_calender_line”,并且在选择上不能改变“holiday_calender_solid”。
答案 0 :(得分:-1)
试试这个..
.sqlproj