RVCalendarWeekView
RVCalendarWeekView copied to clipboard
How to scroll to current day?
Hey, first of all, thanks for this component, it have been really useful.
I'm having this issue where after adding events, the weekview scrolls to the day with the oldest event.
It's there a way I can scroll back to the current day, in a programmatically way?
I tried calling:
[self.weekView.weekFlowLayout scrollCollectionViewToClosetSectionToTime:[NSDate date] animated:NO];
[self.decoratedWeekView.weekFlowLayout scrollCollectionViewToClosetSectionToTime:[NSDate date] animated:NO];
but its not working for me.
Thanks
This should work, when are you calling it? are you doing it in the main thread?
There are all these methods
- (void)scrollCollectionViewToClosetSectionToCurrentTimeAnimated:(BOOL)animated;
- (void)scrollCollectionViewToClosetSectionToTime:(NSDate*)time animated:(BOOL)animated;
- (void)scrollCollectionViewToCurrentTime:(BOOL)animated;
You can use the last one if you want it to scroll to today