-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
triggerScrollToDateDelegate does not trigger willScrollToDateSegmentWith #1262
Comments
I just checked the code which deals with scrolling and I can see that it only calls the func scrollTo(point: CGPoint, triggerScrollToDateDelegate: Bool? = nil, isAnimationEnabled: Bool, extraAddedOffset: CGFloat, completionHandler: (() -> Void)?) {
isScrollInProgress = true
if let validCompletionHandler = completionHandler { scrollDelayedExecutionClosure.append(validCompletionHandler) }
self.triggerScrollToDateDelegate = triggerScrollToDateDelegate
var point = point
if scrollDirection == .horizontal { point.x += extraAddedOffset } else { point.y += extraAddedOffset }
DispatchQueue.main.async() {
self.setContentOffset(point, animated: isAnimationEnabled)
if (isAnimationEnabled && self.calendarOffsetIsAlreadyAtScrollPosition(forOffset: point)) ||
!isAnimationEnabled {
self.scrollViewDidEndScrollingAnimation(self)
}
}
} I would like to know why you decided to not include |
Do it. Help on this project is always welcomed. |
Thanks, I fixed it in the PR #1264 |
@patchthecode please, look this 2 PRs :) |
Hi, I am on version 8.0.3.
While performing
calendar.scrollToDate
, I noticed that the delegate functionwillScrollToDateSegmentWith
is not triggered butdidScrollToDateSegmentWith
is triggered perfectly.I currently load my data in
willScrollToDateSegmentWith
for the visible dates so is there any way to force the delegate function to trigger before thecalendar.scrollToDate
is triggered?I also noticed that the completion handler of
calendar.scrollToDate
triggers before the animation ends so if I try to select a date in the completion handler, it doesn't work.Thank you!
The text was updated successfully, but these errors were encountered: