Jtapplecalendar: scroll to date without animation?

Created on 11 Sep 2018  Â·  2Comments  Â·  Source: patchthecode/JTAppleCalendar

I am using the latest branch.
pod 'JTAppleCalendar', :git => 'https://github.com/patchthecode/JTAppleCalendar.git'

I want to scroll to the specific date without animation, is it already implemented or you can create a new method with animation toggle?

Most helpful comment

it is already implemented.
Hey just as a tip you can see all developer functions in the userInteractionFunctions.swift file.

Almost ever function has optional parameters attached to them.
the full version of scrollToDate is

    public func scrollToDate(_ date: Date,
                             triggerScrollToDateDelegate: Bool = true,
                             animateScroll: Bool = true,
                             preferredScrollPosition: UICollectionViewScrollPosition? = nil,
                             extraAddedOffset: CGFloat = 0,
                             completionHandler: (() -> Void)? = nil) 

Therefore just do scrollToDate( date, animateScroll: false)

All 2 comments

it is already implemented.
Hey just as a tip you can see all developer functions in the userInteractionFunctions.swift file.

Almost ever function has optional parameters attached to them.
the full version of scrollToDate is

    public func scrollToDate(_ date: Date,
                             triggerScrollToDateDelegate: Bool = true,
                             animateScroll: Bool = true,
                             preferredScrollPosition: UICollectionViewScrollPosition? = nil,
                             extraAddedOffset: CGFloat = 0,
                             completionHandler: (() -> Void)? = nil) 

Therefore just do scrollToDate( date, animateScroll: false)

Thanks @patchthecode

Was this page helpful?
0 / 5 - 0 ratings