6

I have been using https://github.com/WenchaoD/FSCalendar recently for a project.

One thing I have been trying to do is call a function whenever the calendar changes months (for example, if the user swipes right or left). However, I can't seem to find any functions that are called when the month on FSCalendar changes.

I tried to override:

func calendar(_ calendar: FSCalendar, boundingRectWillChange bounds: CGRect, animated: Bool) {

But that doesn't seem to work. Maybe I missed something in the documentation. Is there a way to see when the months changes in the FSCalendar package?

Rajendra arora
  • 2,186
  • 1
  • 16
  • 23
rma
  • 1,853
  • 1
  • 22
  • 42

1 Answers1

9

5 seconds after posting this, I found

func calendarCurrentPageDidChange(_ calendar: FSCalendar) {
    print("changed")
}

That solved my problem.

rma
  • 1,853
  • 1
  • 22
  • 42