JTCalendar icon indicating copy to clipboard operation
JTCalendar copied to clipboard

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

Open interstateone opened this issue 8 years ago • 3 comments

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!

interstateone avatar Sep 04 '15 21:09 interstateone

+1. Please, merge this.

pbassut avatar Oct 28 '15 20:10 pbassut

This is great!. +1

alfianlosari avatar Jul 21 '16 03:07 alfianlosari

👍 would be a great merge!

fabrizioq avatar Jan 05 '18 14:01 fabrizioq