FSCalendar function called when month changed
Asked Answered
M

1

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?

Metts answered 1/1, 2019 at 14:58 Comment(0)
M
9

5 seconds after posting this, I found

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

That solved my problem.

Metts answered 1/1, 2019 at 14:59 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.