JTAppleCalendar icon indicating copy to clipboard operation
JTAppleCalendar copied to clipboard

trigger willScrollToDateSegmentWith when scrolling programmatically with scrollToSegment

Open elliotcz97 opened this issue 4 years ago • 1 comments

This PR is a fix and a followup on #1262

My problem was that when I programmatically scrolled the calendar with the function scrollToSegment, then the willScrollToDateSegmentWith delegate did not get called.

I wanted this delegate to work because i wanted to deselect all dates before the scroll did end. I searched for an answer and found the PR #1264 which made the delegate work when the user scrolled with dragging the scrollview. But it did not fix my issue. So i forked his solution and added my fix.

So this PR fixes the willScrollToDateSegmentWith delegate. Now it will get called whenever you scroll via dragging the scrollview, or programmatically using scrollToSegment.

elliotcz97 avatar May 30 '21 10:05 elliotcz97

You need to fix merge conflicts :)

bystritskiy avatar Dec 01 '22 15:12 bystritskiy