-
Notifications
You must be signed in to change notification settings - Fork 531
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
Months don't snap to their edge #207
Comments
I remember having this bug but I don't remember how I solve it and what was it's origin, I think it's coming from the menu view or the synchronisation between the menu view and the calendar. |
Try [calendar reloadAppearance] and [calendar repositionViews] in viewDidLayoutSubviews, that solved my for me. hope this will help |
@jonathantribouharet I will try and spike this out into a separate project I can upload here. But the setup is basically as simple as your examples. @SHIEER must be part of the 1.x versions, in 2.x those are not public selectors. But, when I perform them regardless, it seems to lessen how often the problem appears, but the problem still persists frequently enough to be blocking me from updating.
|
Yes it's from 1.x version, event if |
it is 1.x version, sorry, i didn't see you are on 2.x |
Just wanted to "plus one" this and say that I've hit the same bug. I've tried to create a minimal reproducible example project, but I can't trigger the bug outside of my app. |
…p to their edge”
…p to their edge”
@tomdalling @SHIEER @jlindenbaum check the pullrequest: #218. Hopefully works for your projects. |
@palcalde I've replaced your fixes in my JTHorizontalCalendar - it doesn't seem to address the fix - I can go correctly in one direction, but after one or two swipes in the other direction the same issue reappears. |
Here's a minimal reproduction project that shows the issue (see the README): https://github.com/tomdalling/JTCalendarBugReproduction I tried PR #218, and it mostly works. It causes some weirdness when repeatedly tapping the "Next Month" button in the JTCalendarBugReproduction project. Tapping "Next Month" while the sliding animation is in progress slows down the animation. I'm not sure if it fixes the exact issue I was having in my app. Some recent unrelated changes to my app seem to have made the bug disappear, although I'm not sure why. |
Hey @tomdalling you are right, tapping multiple times on back works great but doing it in next month slows down the animation (at least doesn't break the calendar as before). I've udpated the #218 with a new commit that allows tapping on next multiple times without slowing the animation. Check it out. |
@tomdalling Thank you very much, I wasn't able to reproduce the bug. I still don't know what exactly is the problem. I think it's when there is an interaction during the animation of the scrollview. I may have a simple / dirty hack, after calling
This hack came from http://stackoverflow.com/questions/993280/how-to-detect-when-a-uiscrollview-has-finished-scrolling, I'm using it for |
I haven't found issues after applying the changes in #218. |
Hi there, I have add some code it help a lot to let Months snap to their edge. Please help check I am not sure wether it will solve all problem or not, but after add this lines, I rarely see the problem or maybe I cannot reproduce the bug ? link: https://github.com/cvhong/JTCalendar/commit/350183375ca99d4199c39da7adceb5be5a9aa4cb |
I get the problem as well. It happens when I call loadNextPageWithAnimation serveral time rapidly in succesion. |
When flicking the calendar left / right between months the calendar does not always properly stop at the month's edge, it can go further, or not far enough. This leads to the menu view and the calendar itself being in a weird state.
Simulator: 5S running 8.4
JTCalendar: 2.1.4
The text was updated successfully, but these errors were encountered: