You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I have an array of dates. I want to add circle in the calendar, to the dates that is in the array. How can I do that? I know about this function below. But how can I add rings to all the dates in CalendarView that are equal to the dates in my array?:
func supplementaryView(shouldDisplayOnDayView dayView: DayView) -> Bool {
guard let currentCalendar = currentCalendar else { return false }
var components = Manager.componentsForDate(Foundation.Date(), calendar: currentCalendar)
/* For consistency, always show supplementaryView on the 3rd, 13th and 23rd of the current month/year. This is to check that these expected calendar days are "circled". There was a bug that was circling the wrong dates. A fix was put in for #408 #411.
Other month and years show random days being circled as was done previously in the Demo code.
*/
var shouldDisplay = false
if dayView.date.year == components.year &&
dayView.date.month == components.month {
if (dayView.date.day == 3 || dayView.date.day == 13 || dayView.date.day == 23) {
print("Circle should appear on " + dayView.date.commonDescription)
shouldDisplay = true
}
} else if (Int(arc4random_uniform(3)) == 1) {
shouldDisplay = true
}
return shouldDisplay
}
The text was updated successfully, but these errors were encountered:
So I have an array of dates. I want to add circle in the calendar, to the dates that is in the array. How can I do that? I know about this function below. But how can I add rings to all the dates in CalendarView that are equal to the dates in my array?:
The text was updated successfully, but these errors were encountered: