We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want a scrollToDateor scrollToMonth method for the new Year View
scrollToDate
scrollToMonth
So i can scroll to the month of my need
The text was updated successfully, but these errors were encountered:
With workaround without having an official method, i have implemented my own way to scroll to a specific Date:
func scroll(toDate date: Date, at: UICollectionView.ScrollPosition = .centeredVertically, animated: Bool = true, considerMonth: Bool = true){ let yearToScroll = c.component(.year, from: date) let currentYear = c.component(.year, from: Date()) let monthToScroll = considerMonth ? c.component(.month, from: date) : 0 let itemIndex = (yearToScroll - (currentYear-100)) * 12 + (yearToScroll - (currentYear-100))+monthToScroll self.yearView.scrollToItem(at: IndexPath(item: itemIndex, section: 0), at: at, animated: animated) }
Maybe it can help you @patchthecode
Sorry, something went wrong.
unfortunately function self.yearView.scrollToItem(at: IndexPath(item: itemIndex, section: 0), at: at, animated: animated) not scrolling calendarYear to specified IndePath
it is called and some strange action happens (in mili seconds of time) but calendarYear still starts from the very beginning (
scrollToItem func is definitely getting called since if I put very big row for IndexPath it crashes.
@patchthecode macOs 10.14 Mojave xcode 11.3 JtAppleCalendar github "patchthecode/JTAppleCalendar" "master" using carthage
patchthecode
No branches or pull requests
I want a
scrollToDate
orscrollToMonth
method for the new Year ViewSo i can scroll to the month of my need
The text was updated successfully, but these errors were encountered: