Skip to content
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

Add API for users to check and be notified of scrolling state #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

interstateone
Copy link

Hi! I've had a lot of success with JTCalendar on a recent project and just finished updating it to the 2.x version. I found that it can involve a lot of work to properly update the calendar asyncronously (as encouraged in the README for long-running update tasks) because you have to avoid reloading the calendar manager while either scroll view is still scrolling or else the contentOffset and/or view layouts seem to get messed up. After doing a lot of this work outside of JTCalendar, it seemed like it would be something that would be needed by others so I moved the changes into the library instead.

This change adds scrolling properties to the menu and horizontal content views so that users can check the current state before calling reload and adds two more delegate methods called when the content scroll view finishes scrolling. This also occurs when the content scrolling is triggered by menu view scrolling. This means that users can update their data cache when calendarDidLoad*Page is called and then reload the calendar when the new calendarDidFinishScrollingTo*Page is called.

I haven't made any changes to the vertical content view because I wasn't using it in the project this came from, but can either leave it to you or continue with that once you have a chance to look at the work thus far. Thanks!

It currently involves a lot of work to properly update the calendar
asyncronously (as encouraged in the README for long-running update
tasks) because you have to avoid reloading the calendar manager while
either scroll view is still scrolling. This change adds `scrolling`
properties to the menu and horizontal content views so that users can
check the current state, as well as adds two more delegate methods
called when the content scroll view finishes scrolling. This also occurs
when the content scrolling is triggered by menu view scrolling. This
means that users can update their data cache when
calendarDidLoad*Page is called and then reload the calendar when the new
calendarDidFinishScrollingTo*Page is called.
@pbassut
Copy link

pbassut commented Oct 28, 2015

+1. Please, merge this.

@alfianlosari
Copy link

This is great!. +1

@fabrizioq
Copy link

👍 would be a great merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants