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

Is it possible to change FSCalendar scope by vertical swipe gesture? #244

Closed
bakomchik opened this issue Mar 26, 2016 · 8 comments
Closed

Comments

@bakomchik
Copy link

HI, great thanks for pretty good Calendar.
Can you tell me, Is it possible to change FSCalendar scope by vertical swipe gesture?
Thanks

@WenchaoD
Copy link
Owner

Basiclly you can add a UISwipeGestureRecognizer to FSCalendar, and handle the action by changing scope:

- (void)handleSwipe:(id)sender
{
    [self.calendar setScope:FSCalendarScopeWeek animated:YES];
}

But as the calendar already has an inner swipe gesture for vertical scrolling, you should handle the gesture confliction yourself. But no need to worry if the direction of calendar is horizontal.

@bakomchik
Copy link
Author

Thanks for your help!
But I decided not to use gestures,
because I was faced with problem of vertical swipe gesture and horizontal direction of calendar.
When i perform swipe-down gesture and change scope from week to month, calendar scrolls to date in future.See screenshot bellow.
swipe_gesture
Thanks

@cecgsn
Copy link

cecgsn commented Apr 27, 2016

Sorry for messing with a closed thread, but did @bakomchik get a solution to this issue? It happens to me too

@JFERSD
Copy link

JFERSD commented Oct 6, 2016

It happens to me too. swiping gesture to change from week scope to month scope is changing shown date to 2027.

@WenchaoD
Copy link
Owner

WenchaoD commented Oct 6, 2016

There is a gesture for this function inside. To enable:

calendar.scopeGesture.enabled = YES;

@JFERSD
Copy link

JFERSD commented Oct 7, 2016

@WenchaoD Thank you. I've updated to the last version and it works well.

@patidarjitu
Copy link

patidarjitu commented Sep 14, 2018

How to stop vertical swipe when calendar is in week form.@WenchaoD

@MoeezAli690
Copy link

by default the direction of calendar in horizontal but to move calendar vertically simply add this line
calenderView.scrollDirection = .vertical
Note: This is applicable only in FSCalender

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

No branches or pull requests

6 participants